extern variables and object-like macro consts

This commit is contained in:
2026-06-17 21:52:05 +02:00
parent f5605fd3ec
commit 19e9fbdd4b
33 changed files with 3136 additions and 116 deletions
+4
View File
@@ -128,8 +128,11 @@ Function :: struct {
Global :: struct {
name: symbol.Id,
link_name: string,
type: types.Type,
is_static: bool,
external: bool,
writable: bool,
static_value: i64,
initializer: []Instruction,
problematic: bool,
@@ -171,6 +174,7 @@ destroy_module :: proc(module: ^Module) {
destroy_instructions(function.instructions, module.allocator)
}
for global in module.globals {
delete(global.link_name, module.allocator)
destroy_instructions(global.initializer, module.allocator)
}
for value in module.strings {