Mercurial > lcfOS
diff python/c3/codegenerator.py @ 280:02385f62f250
Rework from str interface to Instruction interface
author | Windel Bouwman |
---|---|
date | Sat, 02 Nov 2013 10:03:26 +0100 |
parents | 2ccd57b1d78c |
children | 1c7c1e619be8 |
line wrap: on
line diff
--- a/python/c3/codegenerator.py Sat Oct 12 09:56:23 2013 +0200 +++ b/python/c3/codegenerator.py Sat Nov 02 10:03:26 2013 +0100 @@ -159,7 +159,11 @@ return ra.e elif type(expr) is astnodes.VariableUse: # This returns the dereferenced variable. - return ir.Mem(self.varMap[expr.target]) + if expr.target.isParameter: + # TODO: now parameters are handled different. Not nice? + return self.varMap[expr.target] + else: + return ir.Mem(self.varMap[expr.target]) elif type(expr) is astnodes.Deref: # dereference pointer type: addr = self.genExprCode(expr.ptr)