comparison python/codegen.py @ 280:02385f62f250

Rework from str interface to Instruction interface
author Windel Bouwman
date Sat, 02 Nov 2013 10:03:26 +0100
parents ea93e0a7a31e
children 7b38782ed496
comparison
equal deleted inserted replaced
279:2ccd57b1d78c 280:02385f62f250
16 def generate(self, ircode): 16 def generate(self, ircode):
17 assert isinstance(ircode, ir.Module) 17 assert isinstance(ircode, ir.Module)
18 obj = object() 18 obj = object()
19 for gvar in ircode.Variables: 19 for gvar in ircode.Variables:
20 print(gvar) 20 print(gvar)
21 print('TODO') 21 raise Exception() # TODO
22 for f in ircode.Functions: 22 for f in ircode.Functions:
23 for bb in f.Blocks: 23 for bb in f.Blocks:
24 for ins in bb.Instructions: 24 for ins in bb.Instructions:
25 # Instruction selection: 25 # Instruction selection:
26 #mi = self.tryMap(ins) 26 #mi = self.tryMap(ins)