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:
2
Makefile
2
Makefile
@@ -150,7 +150,7 @@ $(BIN)/w6c_ww: selfhost/cmd/w6c/main.ww \
|
||||
# ---- ww-side w6a (assembler port, exercised by 991_w6a_ww) ------------
|
||||
# Built like wwdump_ww. Needs -I selfhost/cmd/w6a for the local types/lex/
|
||||
# parse/asm/obj modules and -I selfhost/cmd/wcc to find `mem`.
|
||||
$(BIN)/w6a_ww: selfhost/cmd/w6a/main.ww selfhost/cmd/w6a/types.ww \
|
||||
$(BIN)/w6a_ww: selfhost/cmd/w6a/main.ww selfhost/cmd/w6a/opcodes.ww \
|
||||
selfhost/cmd/w6a/lex.ww selfhost/cmd/w6a/parse.ww \
|
||||
selfhost/cmd/w6a/asm.ww selfhost/cmd/w6a/obj.ww \
|
||||
selfhost/cmd/wcc/mem.ww \
|
||||
|
||||
Reference in New Issue
Block a user