comparison python/ir/value.py @ 147:4e79484a9d47

Moved core to ir folder
author Windel Bouwman
date Fri, 22 Feb 2013 10:33:48 +0100
parents python/ppci/core/value.py@9e552d34bd60
children b28a11c01dbe
comparison
equal deleted inserted replaced
146:91af0e40f868 147:4e79484a9d47
1
2 class Value:
3 def __init__(self, vty=None):
4 self.valueType = vty
5 self.name = None
6 def getContext(self):
7 return self.valueType.context
8 def dump(self):
9 print(self)
10
11 def getName(self):
12 return self.name
13 def setName(self, name):
14 if not self.name and not name:
15 return
16 self.name = name
17
18 if self.st:
19 pass
20 else:
21 pass
22 Name = property(getName, setName)
23
24 class Constant(Value):
25 def __init__(self, value, vty):
26 super().__init__(vty)
27 self.value = value
28 print('new constant value: ', value)
29