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
@@ -161,10 +161,13 @@ Function :: struct {
Global :: struct {
name: symbol.Id,
link_name: string,
type: types.Type,
expr: Expr_Id,
static_value: i64,
is_static: bool,
external: bool,
writable: bool,
dependencies: [dynamic]Global_Id,
calls: []Function_Id,
direct_problem: bool,
@@ -210,6 +213,7 @@ destroy_module :: proc(module: ^Module) {
delete(function.calls, module.allocator)
}
for global in module.globals {
delete(global.link_name, module.allocator)
delete(global.dependencies)
delete(global.calls, module.allocator)
}