Started from "the whole compiler source set compiles under V3 and links"
(v3-selfcompile-image) and pushed the runtime much further.
| Tag | What |
|---|---|
v3-selfcompile-image |
nested modules (ListHandler); HALT; Strings.Delete/Append; 1-char literal to VAR ARRAY OF CHAR; nested anonymous-array bound-clobber fix; sessBuf 4 MiB + manual flush; strNams/strTexts 4096 |
v3-inline-array-fields |
record array fields are inline (standard M2 layout), not pointers: SymTab layout, QbeGen data/access/copy, InitHeap in place, SymTab ALLOCATE→NEW |
v3-nul-strings |
NUL-terminated CHAR arrays (terminator slot at index = count, index = count readable); stdlib Strings and the C shim are NUL-based; m2arg keeps capacity |
af392e1 |
scanner Reset: NEW(buf[i]) (BufBlock needs a descriptor header) |
v3-deref-var-actual |
^ yields the pointee address: sfx := TRUE, so a VAR actual p^/a[i]^ passes the pointee address (was AddrOf(base)) |
Main suite 111/111 throughout.
It now:
FileIO + shim,Reset.VAR actual of a dereferenced pointer (v3-deref-var-actual)For a VAR actual that is a dereferenced pointer (b[0]^), V3 passed
AddrOf(b) instead of the pointee address. Design's ^ handler now
always sets sfx := TRUE (q holds the pointee address), so Fact's
VAR-actual note is q itself. Repro Fill(b[0]^) now works; the
scanner's FileIO.ReadBytes(src, buf[i]^, read) is correct.
The self-compiled compiler now parses the scanner/parser and reaches the
source's TYPE block, then segfaults in SymTab.OpaqueBase
(TypeItem ← TypeBlock ← DeclSeq ← ProgModule), dereferencing a bad
symbol node (mov 0x49(%rax),…). Next runtime bug to chase.
FileIO selection and bootstrap/fixpoint.sh
(Stage1 gm2 → Stage2 V3 → Stage3 V3, byte-identical .ssa), with the
stage-aware CR flag (-m for gm2, no -m for V3).compiler/toto.mod is the user's uncommitted edit (left alone).