mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-19 08:32:33 +00:00
Minor reorganization
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user