Mercurial > lcfOS
diff python/c3/codegenerator.py @ 252:c4370696ccc7
added optimize function
author | Windel Bouwman |
---|---|
date | Tue, 30 Jul 2013 17:57:46 +0200 |
parents | e41e4109addd |
children | 7416c923a02a |
line wrap: on
line diff
--- a/python/c3/codegenerator.py Mon Jul 29 20:23:13 2013 +0200 +++ b/python/c3/codegenerator.py Tue Jul 30 17:57:46 2013 +0200 @@ -190,7 +190,7 @@ self.builder.addIns(ins) return self.cast_to_rvalue(expr, tmp2) elif type(expr) is astnodes.Literal: - tmp = self.builder.newTmp() + tmp = self.builder.newTmp('const') ins = ir.ImmLoad(tmp, expr.val) self.builder.addIns(ins) return tmp