Compiler upto invocation completed.
[trinary.git] / extended / Register.py
blob9cf845ca1202a03112959fd1cc17b0285e412f0c
2 class Register(object):
4 def __init__(self, virtual_ndx = False, datatype = False):
5 if virtual_ndx == False:
6 self.virtual_ndx = -1
7 else:
8 self.virtual_ndx = virtual_ndx
10 if datatype != False:
11 self.datatype = datatype
13 self.mem_loc = 0
15 def __str__(self):
16 return str(self.virtual_ndx)
18 def set_virtual_ndx(self, virtual_ndx):
19 self.virtual_ndx = virtual_ndx
21 def get_virtual_ndx(self):
22 return self.virtual_ndx
24 def set_datatype(self, datatype):
25 self.data_type = datatype
27 def get_datatype(self):
28 return self.datatype
30 def set_mem_loc(self, loc):
31 self.mem_loc = loc
33 def get_mem_loc(self):
34 return self.mem_loc