annotate python/ppci/core/value.py @ 108:8267ba1dbce3

Added testcode
author Windel Bouwman
date Tue, 01 Jan 2013 17:17:44 +0100
parents ed230e947dc6
children 9e552d34bd60
rev   line source
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
1
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
2 class Value:
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
3 def __init__(self, vty):
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
4 self.valueType = ty
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
5 self.name = None
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
6 def getContext(self):
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
7 return self.valueType.context
104
ed230e947dc6 Added hexviewer
windel
parents: 95
diff changeset
8 def dump(self):
ed230e947dc6 Added hexviewer
windel
parents: 95
diff changeset
9 print(self)
70
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
10
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
11 def setName(self, name):
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
12 if not self.name and not name:
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
13 return
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
14 self.name = name
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
15
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
16 if self.st:
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
17 pass
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
18 else:
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
19 pass
35286e8abd03 Added some llvm classes
windel
parents:
diff changeset
20