Mercurial > lcfOS
diff python/c3/codegenerator.py @ 227:82dfe6a32717
Fixed tests
author | Windel Bouwman |
---|---|
date | Fri, 12 Jul 2013 17:42:39 +0200 |
parents | 1c7364bd74c7 |
children | 7f18ed9b6b7e |
line wrap: on
line diff
--- a/python/c3/codegenerator.py Fri Jul 12 17:25:31 2013 +0200 +++ b/python/c3/codegenerator.py Fri Jul 12 17:42:39 2013 +0200 @@ -166,6 +166,11 @@ ins = ir.Load(addr, tmp) self.builder.addIns(ins) return tmp + elif type(expr) is astnodes.FieldRef: + tmp = self.builder.newTmp('struct_mem' + expr.field) + #ins = ir.BinaryOperator( + # TODO: add offset? + return tmp elif type(expr) is astnodes.Literal: tmp = self.builder.newTmp() ins = ir.ImmLoad(tmp, expr.val)