comparison python/ppci/codegen/codegen.py @ 348:442fb043d149

Added log option to zcc
author Windel Bouwman
date Sat, 08 Mar 2014 15:32:33 +0100
parents 3bb7dcfe5529
children c2ddc8a36f5e
comparison
equal deleted inserted replaced
346:3bb7dcfe5529 348:442fb043d149
47 return frame 47 return frame
48 48
49 def generate(self, ircode, outs): 49 def generate(self, ircode, outs):
50 """ Generate code into output stream """ 50 """ Generate code into output stream """
51 assert isinstance(ircode, ir.Module) 51 assert isinstance(ircode, ir.Module)
52 outs.selectSection('code') 52 outs.select_section('code')
53 53
54 # Munch program into a bunch of frames. One frame per function. 54 # Munch program into a bunch of frames. One frame per function.
55 # Each frame has a flat list of abstract instructions. 55 # Each frame has a flat list of abstract instructions.
56 # Generate code for all functions: 56 # Generate code for all functions:
57 self.frames = [self.generateFunc(f, outs) for f in ircode.Functions] 57 self.frames = [self.generateFunc(f, outs) for f in ircode.Functions]