diff options
| author | gingerBill <bill@gingerbill.org> | 2018-06-17 16:35:22 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-06-17 16:35:22 +0100 |
| commit | 4d9d38cc282ab5bb509c54f8ef8c2ba4b607e258 (patch) | |
| tree | 73a350f2a9a77a48e8c369a52db5fdab400e22f7 /src/check_stmt.cpp | |
| parent | 5b71ffd4f9e0ea17ccf81ef84800fde7efd32fb9 (diff) | |
Move TypeAndValue to Ast from Map
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index a98b86250..60859a90d 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -292,7 +292,7 @@ Type *check_assignment_variable(CheckerContext *ctx, Operand *lhs, Operand *rhs) Ast *ln = unparen_expr(lhs->expr); if (ln->kind == Ast_IndexExpr) { Ast *x = ln->IndexExpr.expr; - TypeAndValue tav = type_and_value_of_expr(&ctx->checker->info, x); + TypeAndValue tav = x->tav; GB_ASSERT(tav.mode != Addressing_Invalid); if (tav.mode != Addressing_Variable) { if (!is_type_pointer(tav.type)) { @@ -1072,7 +1072,7 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) { } if (operand.expr->kind == Ast_CallExpr) { AstCallExpr *ce = &operand.expr->CallExpr; - Type *t = type_of_expr(&ctx->checker->info, ce->proc); + Type *t = type_of_expr(ce->proc); if (is_type_proc(t)) { if (t->Proc.require_results) { gbString expr_str = expr_to_string(ce->proc); |