Minor reorganization

This commit is contained in:
gingerBill
2026-06-17 12:14:06 +01:00
parent bd89538ca2
commit 45b1bfe96a
2 changed files with 3 additions and 3 deletions

View File

@@ -76,6 +76,7 @@ Function :: struct {
type_index: u32,
type: Func_Type, // resolved signature ({} if the type id was out of range)
imported: bool,
exported: bool,
name: string, // export / name-section / import field (borrowed)
import_module: string, // borrowed, "" for defined functions
import_field: string, // borrowed, "" for defined functions

View File

@@ -42,8 +42,7 @@ sbprint_module :: proc(sb: ^strings.Builder, m: Module) {
}
}
relocs_group, _ := parse_relocations(m, m.allocator)
defer delete(relocs_group, m.allocator)
relocs_group, _ := parse_relocations(m, context.temp_allocator)
// sections
for sec in m.sections {
@@ -173,7 +172,7 @@ sbprint_module :: proc(sb: ^strings.Builder, m: Module) {
write_func_type(sb, f.type)
if f.imported {
strings.write_string(sb, " @ import ")
strings.write_string(sb, "\n import ")
strings.write_quoted_string(sb, f.import_module)
strings.write_string(sb, " ")
strings.write_quoted_string(sb, f.import_field)