comparison python/ir/instruction.py @ 160:10330be89bc2

Started from scratch with code edit
author Windel Bouwman
date Sat, 09 Mar 2013 11:56:48 +0100
parents 9683a4cd848f
children 4348da5ca307
comparison
equal deleted inserted replaced
159:5e1dd04cb61c 160:10330be89bc2
34 self.value = value 34 self.value = value
35 self.name = name 35 self.name = name
36 def __repr__(self): 36 def __repr__(self):
37 return 'load {0} = {1}'.format(self.name, self.value) 37 return 'load {0} = {1}'.format(self.name, self.value)
38 38
39 class StoreInstruction(Instruction):
40 def __init__(self, name, value):
41 self.name = name
42 self.value = value
43 def __repr__(self):
44 return 'store {0}'.format(self.name)
45
39 class BranchInstruction(Instruction): 46 class BranchInstruction(Instruction):
40 def __init__(self, t1, t2): 47 def __init__(self, t1, t2):
41 self.t1 = t1 48 self.t1 = t1
42 self.t2 = t2 49 self.t2 = t2
43 def __repr__(self): 50 def __repr__(self):