harden compiler parsing, recovery, and deep-expression handling

This commit is contained in:
2026-06-12 00:28:45 +02:00
parent a5ceb727c1
commit 99ba907f59
13 changed files with 1159 additions and 503 deletions
+4 -4
View File
@@ -79,7 +79,7 @@ Function :: struct {
result: types.Type,
locals: []Local,
body: []int,
direct_global_reads: []int,
direct_global_reads: [dynamic]int,
calls: []int,
problematic: bool,
diagnostic: int,
@@ -91,7 +91,7 @@ Global :: struct {
expr: int,
static_value: i64,
is_static: bool,
dependencies: []int,
dependencies: [dynamic]int,
calls: []int,
direct_problem: bool,
problematic: bool,
@@ -125,11 +125,11 @@ destroy_module :: proc(module: ^Module) {
delete(function.params, module.allocator)
delete(function.locals, module.allocator)
delete(function.body, module.allocator)
delete(function.direct_global_reads, module.allocator)
delete(function.direct_global_reads)
delete(function.calls, module.allocator)
}
for global in module.globals {
delete(global.dependencies, module.allocator)
delete(global.dependencies)
delete(global.calls, module.allocator)
}
delete(module.exprs)