From ca442defbbaae4269ff947dfc14059f69a5cdaec Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 14 Jul 2023 17:34:00 +0100 Subject: Mocking out call related stuff --- src/tilde_const.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/tilde_const.cpp') diff --git a/src/tilde_const.cpp b/src/tilde_const.cpp index 6f9736554..7a8be70c7 100644 --- a/src/tilde_const.cpp +++ b/src/tilde_const.cpp @@ -17,7 +17,7 @@ gb_internal cgValue cg_const_nil(cgProcedure *p, Type *type) { } if (is_type_internally_pointer_like(type)) { - return cg_value(tb_inst_ptr(p->func, 0), type); + return cg_value(tb_inst_uint(p->func, dt, 0), type); } else if (is_type_integer(type) || is_type_boolean(type) || is_type_bit_set(type)) { return cg_value(tb_inst_uint(p->func, dt, 0), type); } else if (is_type_float(type)) { @@ -34,7 +34,7 @@ gb_internal cgValue cg_const_nil(cgProcedure *p, Type *type) { return {}; } -gb_internal cgValue cg_const_value(cgProcedure *p, Type *type, ExactValue const &value) { +gb_internal cgValue cg_const_value(cgModule *m, cgProcedure *p, Type *type, ExactValue const &value) { TB_Node *node = nullptr; if (value.kind == ExactValue_Invalid) { @@ -42,4 +42,9 @@ gb_internal cgValue cg_const_value(cgProcedure *p, Type *type, ExactValue const } return cg_value(node, type); +} + +gb_internal cgValue cg_const_value(cgProcedure *p, Type *type, ExactValue const &value) { + GB_ASSERT(p != nullptr); + return cg_const_value(p->module, p, type, value); } \ No newline at end of file -- cgit v1.2.3