intern identifiers

This commit is contained in:
2026-06-10 21:27:00 +02:00
parent d6e03b6f08
commit cdbe4fbc99
16 changed files with 497 additions and 182 deletions
+1 -2
View File
@@ -327,7 +327,7 @@ lower :: proc(hir_module: ^hir.Module, allocator := context.allocator) -> ir.Mod
module := ir.init_module(allocator)
for global in hir_module.globals {
append(&module.globals, ir.Global{
name=fmt.aprintf("%s", global.name, allocator=allocator),
name=global.name,
type=global.type,
is_static=global.is_static,
static_value=global.static_value,
@@ -342,7 +342,6 @@ lower :: proc(hir_module: ^hir.Module, allocator := context.allocator) -> ir.Mod
param_types[index] = function.locals[local_id].type
}
append(&module.functions, ir.Function{
name=fmt.aprintf("%s", function.name, allocator=allocator),
link_name=fmt.aprintf("%s", function.link_name, allocator=allocator),
c_abi=function.c_abi,
is_main=function.is_main,