Selector Call Expressions: x->y(123) == x.y(x, 123)

This commit is contained in:
gingerBill
2020-05-22 14:54:30 +01:00
parent 76a230372f
commit 7bd1039a49
7 changed files with 244 additions and 2023 deletions
+7
View File
@@ -7678,6 +7678,13 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) {
return ir_add_module_constant(proc->module, tv.type, tv.value);
case_end;
case_ast_node(se, SelectorCallExpr, expr);
GB_ASSERT(se->modified_call);
TypeAndValue tav = type_and_value_of_expr(expr);
GB_ASSERT(tav.mode != Addressing_Invalid);
return ir_addr_load(proc, ir_build_addr(proc, se->call));
case_end;
case_ast_node(te, TernaryExpr, expr);
ir_emit_comment(proc, str_lit("TernaryExpr"));