aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-06-03 19:18:47 +0100
committergingerBill <bill@gingerbill.org>2018-06-03 19:18:47 +0100
commitc39332c7e75eed6b21765b4f08376ff9afbb3c38 (patch)
treec3c4bd5671e2a75bcef1de070516d179091530c5 /src
parent3f4b6b22dce11b538baf61705c1787e6e013af04 (diff)
Revert name mangling
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 4843f7453..74b4a5908 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -6166,12 +6166,8 @@ void ir_build_nested_proc(irProcedure *proc, AstNodeProcLit *pd, Entity *e) {
isize name_len = proc->name.len + 1 + pd_name.len + 1 + 10 + 1;
u8 *name_text = gb_alloc_array(proc->module->allocator, u8, name_len);
- if (is_type_polymorphic(e->type)) {
- i32 guid = cast(i32)proc->children.count;
- name_len = gb_snprintf(cast(char *)name_text, name_len, "%.*s.%.*s-%d", LIT(proc->name), LIT(pd_name), guid);
- } else {
- name_len = gb_snprintf(cast(char *)name_text, name_len, "%.*s.%.*s", LIT(proc->name), LIT(pd_name));
- }
+ i32 guid = cast(i32)proc->children.count;
+ name_len = gb_snprintf(cast(char *)name_text, name_len, "%.*s.%.*s-%d", LIT(proc->name), LIT(pd_name), guid);
String name = make_string(name_text, name_len-1);
@@ -6226,12 +6222,9 @@ void ir_build_constant_value_decl(irProcedure *proc, AstNodeValueDecl *vd) {
irModule *m = proc->module;
isize name_len = proc->name.len + 1 + ts_name.len + 1 + 10 + 1;
u8 *name_text = gb_alloc_array(m->allocator, u8, name_len);
- if (is_type_polymorphic(e->type)) {
- i32 guid = cast(i32)m->members.entries.count;
- name_len = gb_snprintf(cast(char *)name_text, name_len, "%.*s.%.*s-%d", LIT(proc->name), LIT(ts_name), guid);
- } else {
- name_len = gb_snprintf(cast(char *)name_text, name_len, "%.*s.%.*s", LIT(proc->name), LIT(ts_name));
- }
+ i32 guid = cast(i32)m->members.entries.count;
+ name_len = gb_snprintf(cast(char *)name_text, name_len, "%.*s.%.*s-%d", LIT(proc->name), LIT(ts_name), guid);
+
String name = make_string(name_text, name_len-1);
irValue *value = ir_value_type_name(m->allocator, name, e->type);