diff options
| author | gingerBill <bill@gingerbill.org> | 2023-07-14 17:34:00 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-07-14 17:34:00 +0100 |
| commit | ca442defbbaae4269ff947dfc14059f69a5cdaec (patch) | |
| tree | a8271218dac5b88f7d9a3ec8a2953bb39473d28d /src/tilde_const.cpp | |
| parent | b17ebeb6f66f5f7e24b5a1ca32baf6855185eea8 (diff) | |
Mocking out call related stuff
Diffstat (limited to 'src/tilde_const.cpp')
| -rw-r--r-- | src/tilde_const.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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 |