From 45b1bfe96ab7a6565dae13d03b5b5a5d24bb1315 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 17 Jun 2026 12:14:06 +0100 Subject: [PATCH] Minor reorganization --- core/rexcode/wasm/module/module.odin | 1 + core/rexcode/wasm/module/print.odin | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/rexcode/wasm/module/module.odin b/core/rexcode/wasm/module/module.odin index cd371721b..a12ab48d9 100644 --- a/core/rexcode/wasm/module/module.odin +++ b/core/rexcode/wasm/module/module.odin @@ -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 diff --git a/core/rexcode/wasm/module/print.odin b/core/rexcode/wasm/module/print.odin index 17a0d0dbe..0d9ee5055 100644 --- a/core/rexcode/wasm/module/print.odin +++ b/core/rexcode/wasm/module/print.odin @@ -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)