|
Joos1W Compiler Framework
|
Wraps a value for expression evaluation. This distinguishes an LValue from an RValue, wrapping the tir::Value* mapped from an ExprValue. The criteria for an L/R value is as follows: More...
#include <CGExpr.h>
Public Types | |
| enum class | Kind { StaticFn , MemberFn , AstType , AstDecl , L , R } |
Public Member Functions | |
| ValueWrapper (ast::Type const *aty) | |
| Wrap an AST Type node. This can not be an IR value. More... | |
| ValueWrapper (ast::Decl const *decl) | |
| Wrap an AST FieldDecl node. This can not be an IR value. More... | |
| tir::Value * | asRValue (tir::IRBuilder &) const |
| tir::Value * | asLValue () const |
| tir::Value * | asFn () const |
| ast::Type const * | astType () const |
| tir::Type * | irType () const |
| Kind | kind () const |
| bool | validate (CodeGenerator &cg) const |
| ast::Decl const * | asDecl () const |
| tir::Value * | thisRef () const |
| void | dump () const |
Static Public Member Functions | |
| static ValueWrapper | L (ast::Type const *aty, tir::Type *elemTy, tir::Value *value) |
| Create an L-value wrapper for a pointer value. More... | |
| static ValueWrapper | R (ast::Type const *aty, tir::Value *value) |
| Create an R-value wrapper for a non-pointer value. More... | |
| static ValueWrapper | Fn (Kind kind, ast::Decl const *fn, tir::Value *value, tir::Value *refThis=nullptr) |
| Wrap a static function value or a member function value. More... | |
Wraps a value for expression evaluation. This distinguishes an LValue from an RValue, wrapping the tir::Value* mapped from an ExprValue. The criteria for an L/R value is as follows:
|
inlineexplicit |
|
inlineexplicit |
|
inlinestatic |
Wrap a static function value or a member function value.
| value | The IR function value to wrap. |
Definition at line 96 of file CGExpr.h.
|
inlinestatic |
Create an L-value wrapper for a pointer value.
| aty | The AST type of the reference. |
| elemTy | The dereferenced IR type. |
| value | The pointer value to wrap. |
|
inlinestatic |
Create an R-value wrapper for a non-pointer value.
| aty | The AST type of the value. |
| value | The IR value to wrap. |
Definition at line 85 of file CGExpr.h.