wcc: mangle private decls as <module>.<name> via // MODULE: marker

This commit is contained in:
2026-05-11 15:16:22 +09:00
parent d7036be0e5
commit 895f221b6c
5 changed files with 423 additions and 39 deletions

View File

@@ -108,10 +108,11 @@ type node = struct {
exported: i32, // bool — `export` keyword present
type_: *void, // filled in by checker; type.ww treats it as *tinfo
tsuffix: str, // typed numeric literal suffix ("i32", "u64", ...)
module: str, // originating module from `// MODULE: foo`; "" if none
};
export fn newnode(a: *arena, k: i32, file: str, line: i32, col: i32) *node = {
let n: *node = amalloc(a, 192u64): *node; // 192 ≥ struct size
let n: *node = amalloc(a, 208u64): *node; // ≥ struct size
n.kind = k;
n.file = file;
n.line = line;