vox.fe.passes.eval

Members

Functions

eval_builtin_member
IrIndex eval_builtin_member(BuiltinId builtin, AstIndex obj, TokenIndex loc, CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
eval_call
IrIndex eval_call(CallExprNode* node, AstIndex callee, CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
eval_call_builtin
IrIndex eval_call_builtin(TokenIndex loc, IrVm* vm, AstIndex callee, IrIndex[] args, CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
eval_constructor
IrIndex eval_constructor(CallExprNode* node, AstIndex callee, CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
eval_static_expr
IrIndex eval_static_expr(AstIndex nodeIndex, CompilationContext* context)

Eval expression Returns a constant

eval_static_expr_alias
AstIndex eval_static_expr_alias(AstIndex nodeIndex, CompilationContext* c)

Evaluates expression that results in $alias and returns it as AstIndex

eval_static_expr_bin_op
IrIndex eval_static_expr_bin_op(BinaryExprNode* node, CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
eval_static_expr_call
IrIndex eval_static_expr_call(CallExprNode* node, CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
eval_static_expr_member
IrIndex eval_static_expr_member(MemberExprNode* node, CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
eval_static_expr_name_use
IrIndex eval_static_expr_name_use(NameUseExprNode* node, CompilationContext* context)
Undocumented in source. Be warned that the author may not have intended to support it.
eval_static_expr_type
AstIndex eval_static_expr_type(AstIndex nodeIndex, CompilationContext* c)

Evaluates expression that results in $type and returns it as AstIndex

eval_static_expr_un_op
IrIndex eval_static_expr_un_op(UnaryExprNode* node, CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
force_callee_ir_gen
void force_callee_ir_gen(FunctionDeclNode* callee, AstIndex calleeIndex, CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta

Authors

Andrey Penechko. Constant folding and Compile-time function evaluation (CTFE) Requires nodes that are evaluated to be type checked