Constant expression could be translated to llvm value tree.
In this issue, we need implements following things:
- Semantic analysis:
- Make sure the expression is a constant expression. Now we need support literal constant and expression composited by it only. Constant variable consider later.
- Translate value to llvm supported, and save them in a instance of class "constant semantic info"
- Code generation:
- translate literal constant value to llvm::Value object, and construct the expression tree.
- Write test about it.
And the type of literal constant we only support int32 & uint32.
More types support will be added later.
Original issue reported on code.google.com by wuye9036 on 20 Sep 2010 at 4:38
Original issue reported on code.google.com by
wuye9036
on 20 Sep 2010 at 4:38