codegen: avoid a table lookup
parent
0b94c83deb
commit
74eaf43768
|
@ -2515,6 +2515,7 @@ static TypeTableEntry *analyze_lvalue(CodeGen *g, ImportTableEntry *import, Bloc
|
|||
expected_rhs_type = g->builtin_types.entry_invalid;
|
||||
} else {
|
||||
expected_rhs_type = var->type;
|
||||
lhs_node->data.symbol_expr.variable = var;
|
||||
}
|
||||
} else {
|
||||
add_node_error(g, lhs_node,
|
||||
|
|
|
@ -889,8 +889,7 @@ static LLVMValueRef gen_lvalue(CodeGen *g, AstNode *expr_node, AstNode *node,
|
|||
LLVMValueRef target_ref;
|
||||
|
||||
if (node->type == NodeTypeSymbol) {
|
||||
VariableTableEntry *var = find_variable(expr_node->block_context,
|
||||
&node->data.symbol_expr.symbol);
|
||||
VariableTableEntry *var = node->data.symbol_expr.variable;
|
||||
assert(var);
|
||||
|
||||
*out_type_entry = var->type;
|
||||
|
|
Loading…
Reference in New Issue