Suite 135/135; self-hosting fixpoint OK
(bootstrap/fixpoint.sh, image 2,142,363 bytes). master, tree
clean except the user's uncommitted compiler/toto.mod.
This session landed the three items left open at the previous save, then showcased them.
| Step | Tag | Commit | What |
|---|---|---|---|
| Variant records | v3-variant-records |
252d7dd |
RECORD … ; CASE tag : T OF … END |
| UString + Files | v3-ustring-files |
36e8dcf |
a := U"…" content copy; Files on IOChan |
| Showcase | v3-showcase16 |
36e8dcf |
the three features in one program |
Shape = RECORD
id : INTEGER;
CASE k : Kind OF
circle : radius : INTEGER;
| square : side : INTEGER;
| rect : w, h : INTEGER;
END;
END
CASE keyword,
so RecItem is unambiguously RecField | CaseField. Labels are
parsed but not interpreted; a non-ordinal tag is error 224.SymTab: SetVariantTag/MarkVariant/IsVariant/ResetFields/
IsOrdinal; ComputeOffsets and TypeSizeD handle the overlay.WITH over variant fields works (verified).summary_variant-records.md.a := U"…" into a 1-D ARRAY OF UCHAR is a content copy
(count-clamped, 0 terminator), mirroring CHAR strings.SymTab.IsUCharArray, QbeGen.UAssign, shim m2uassign.
The descriptor is { l count, w codepoints… }, so the body copies
32-bit elements off a 64-bit header.UCHAR arrays now reserve a terminator slot (z (n+1)*4), heap
allocation and bounds checks included.U"…" literal and a UCHAR array both pass to an open
VAR ARRAY OF UCHAR formal.summary_ustring-files.md.IOChan gained Handle(cid): ADDRESS / MakeChan(h): ChanId so a
library can wrap a channel.Files.FileRec holds an IOChan.ChanId; all I/O delegates to
IOChan, with NIL guards. Files gained ReadString (one line).Files API is unchanged apart from that addition.compiler/tests/showcase16.mod (Showcase16, exit 42): a Shape
variant record, a U"ok✓" content copy, and a write/read round-trip
through a Files handle.
showcase16: id=3 total=42
New: t_variant (31), t_ustrassign (63), t_ustrformal (3),
Showcase16 (42). FilesProg/TBadFile/MixProg/Showcase11 file
lists now include SysShim + IOChan.
cd .../m2compiler-V3
./bootstrap/fixpoint.sh # FIXPOINT OK
cd compiler && ./build.sh && ./run_tests.sh # 135/135
CLASS lowering (declared + checked only).IOChan position/seek; ISO ConvResults enumerations (now
expressible); UString concatenation/Length.