Mercurial > lcfOS
comparison python/ppci/c3/codegenerator.py @ 334:6f4753202b9a
Added more recipes
author | Windel Bouwman |
---|---|
date | Thu, 13 Feb 2014 22:02:08 +0100 |
parents | 56e6ff84f646 |
children | d1ecc493384e |
comparison
equal
deleted
inserted
replaced
333:dcae6574c974 | 334:6f4753202b9a |
---|---|
32 self.prepare() | 32 self.prepare() |
33 assert type(pkg) is ast.Package | 33 assert type(pkg) is ast.Package |
34 self.pkg = pkg | 34 self.pkg = pkg |
35 self.intType = pkg.scope['int'] | 35 self.intType = pkg.scope['int'] |
36 self.boolType = pkg.scope['bool'] | 36 self.boolType = pkg.scope['bool'] |
37 self.logger.info('Generating ir-code for {}'.format(pkg.name), extra={'c3_ast':pkg}) | 37 self.logger.debug('Generating ir-code for {}'.format(pkg.name), extra={'c3_ast':pkg}) |
38 self.varMap = {} # Maps variables to storage locations. | 38 self.varMap = {} # Maps variables to storage locations. |
39 self.funcMap = {} | 39 self.funcMap = {} |
40 self.m = ir.Module(pkg.name) | 40 self.m = ir.Module(pkg.name) |
41 try: | 41 try: |
42 for s in pkg.innerScope.Functions: | 42 for s in pkg.innerScope.Functions: |