From 4d9d38cc282ab5bb509c54f8ef8c2ba4b607e258 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 17 Jun 2018 16:35:22 +0100 Subject: Move TypeAndValue to Ast from Map --- src/ir_print.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index a1982479d..880e9d5ef 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -681,7 +681,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * for (isize i = 0; i < elem_count; i++) { if (i > 0) ir_write_str_lit(f, ", "); - TypeAndValue tav = type_and_value_of_expr(m->info, cl->elems[i]); + TypeAndValue tav = cl->elems[i]->tav; GB_ASSERT(tav.mode != Addressing_Invalid); ir_print_compound_element(f, m, tav.value, elem_type); } @@ -715,7 +715,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * ast_node(fv, FieldValue, cl->elems[i]); String name = fv->field->Ident.token.string; - TypeAndValue tav = type_and_value_of_expr(m->info, fv->value); + TypeAndValue tav = fv->value->tav; GB_ASSERT(tav.mode != Addressing_Invalid); Selection sel = lookup_field(type, name, false); @@ -727,7 +727,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * } else { for_array(i, cl->elems) { Entity *f = type->Struct.fields[i]; - TypeAndValue tav = type_and_value_of_expr(m->info, cl->elems[i]); + TypeAndValue tav = cl->elems[i]->tav; ExactValue val = {}; if (tav.mode != Addressing_Invalid) { val = tav.value; -- cgit v1.2.3