selfhost/cmd/w6a: rename types.ww → opcodes.ww (#11)
The file declares `package w6a;` (not a real `types` module), so `import types;` was only the bundler file-key. The shadow against lib/types/ blocked any w6a TU that wanted to pull lib/strings or lib/bytes (both transitively reach `types.I64_MAX`); the w6a-local shadow won the source-dir-first resolver, and `types.I64_MAX` came back undefined → "ordered comparison on non-numeric". Rename the file to its actual role — opcode + register enums mirroring 6.out.h — and update the four import lines + Makefile prereq. No symbol-call sites changed: every constant already resolves unqualified inside the w6a package. Unblocks #7 astrndup workaround comments in main.ww / parse.ww; γ-2 (convert those two sites + delete astrndup export from selfhost/cmd/wcc/mem.ww) becomes mechanical. Verified 132/132 incl. 991_w6a_ww.
This commit is contained in:
@@ -860,7 +860,7 @@ export fn freearena(a: *arena) void = {
|
||||
};
|
||||
};
|
||||
|
||||
// selfhost/cmd/w6a/types.ww — types + constants shared across the
|
||||
// selfhost/cmd/w6a/opcodes.ww — types + constants shared across the
|
||||
// w6a port. Mirrors cmd/w6a/a.h and cmd/w6c/6.out.h.
|
||||
|
||||
package w6a;
|
||||
@@ -1167,7 +1167,7 @@ package w6a;
|
||||
import os;
|
||||
import mem;
|
||||
import lex;
|
||||
import types;
|
||||
import opcodes;
|
||||
|
||||
fn streqlit(p: *u8, n: u64, lit: str) bool = {
|
||||
if (n != lit.len: u64) { return false; };
|
||||
@@ -1752,7 +1752,7 @@ package w6a;
|
||||
import os;
|
||||
import rt;
|
||||
import mem;
|
||||
import types;
|
||||
import opcodes;
|
||||
|
||||
// ---- text buffer growth ------------------------------------------------
|
||||
|
||||
@@ -2606,7 +2606,7 @@ package w6a;
|
||||
|
||||
import os;
|
||||
import mem;
|
||||
import types;
|
||||
import opcodes;
|
||||
|
||||
// Local wrappers around os.writeall's tagged return — collapse the
|
||||
// (i64 | oserror) back to a boolean / int sentinel for the
|
||||
@@ -3016,7 +3016,7 @@ package main;
|
||||
import os;
|
||||
import rt;
|
||||
import mem;
|
||||
import types;
|
||||
import opcodes;
|
||||
import lex;
|
||||
import parse;
|
||||
import asm;
|
||||
|
||||
Reference in New Issue
Block a user