Status at tag v3-fwdvars-resultsfx (2026-10-01). Suite 175/175,
self-hosting fixpoint OK. This is a reader-facing report: what the
compiler accepts today, what it deliberately does not, and what is
missing. It complements docs/features.md (feature-by-feature) and
docs/analysis_gaps.md (gap taxonomy).
Legend: ✅ done · 🔄 partial · ⏸ not implemented · 🚫 deliberately out
A from-scratch Modula-2 compiler: a Coco/R-generated frontend
(compiler/src/M2.atg, 1,7xx lines, ~75 productions) lowered to QBE
SSA (QbeGen.mod), assembled and linked to a small C runtime shim
(runtime/syslib/shim.c). Classic identifiers (no _), # for
"not equal", 0x hex, // comments; the whole image is buffered and
written in one pass, and the compiler self-hosts byte-identically.
letter { letter | digit }, no underscores.0x/0X hex, char codes NN C), reals with E
exponents, '…'/"…" strings, U'…'/U"…" codepoint literals.#, <, <=, >, >=, =; NOT/AND/OR only.// line comments and nested (* … *) block comments.INTEGER, CARDINAL, SHORTINT, LONGINT, SHORTCARD,
REAL, LONGREAL, CHAR, BOOLEAN, NIL, BITSET.LONGCARD, SHORTREAL, INTEGER8/16/32/64,
CARDINAL8/16/32/64, and SYSTEM storage names BYTE, SBYTE,
WORD, SWORD, LONGWORD, SHORTADDR, LONGADDR, PROC,
PROCESS, LOC, ADDRESS.BOOLEAN/enum subranges
(bounds folded, anchored T[lo..hi]); enumerations.ARRAY [lo..hi, …] OF T (multi-dimensional), open ARRAY OF T
formals, index-type arrays ARRAY <ordinalType> OF T.RECORD, including variant records (CASE tag : T OF … END);
whole-record assignment is a flat byte blit.SET OF bool/char/subrange/enum (multi-word, span ≤ 65536).POINTER TO, opaque TYPE T; + completion, ADDRESS ↔ pointer.PROCEDURE … : T types and procedure-typed values.UCHAR (32-bit codepoint) and UString (U"…").+ - * / DIV MOD, comparisons, eager AND/OR/
NOT, IN, set union/diff/inter/symdiff, pointer =/#,
indexing, field access, ^ deref, qualified L.x / L.P.=/# (content), + (concat), assignment (content copy,
NUL-terminated), LEN/LENGTH; UString +/LEN likewise.IF/ELSIF/ELSE, CASE (labels, ranges, ELSE), WHILE,
REPEAT/UNTIL, LOOP/EXIT, FOR/TO/BY (static sign), WITH,
RETURN, HALT, NEW/DISPOSE.VAL, ADR, TSIZE, SIZE, HIGH, LEN, INC, DEC,
INCL/EXCL, SHIFT/ROTATE, MIN/MAX (any ordinal type,
array or set).F()^, F()[i],
F().field.FROM libc IMPORT … — permissive external C procedures.T{…} (static and runtime), expr BY n.DEFINITION/IMPLEMENTATION modules, IMPORT /
FROM … IMPORT, EXPORT (incl. QUALIFIED), nested local modules.VAR parameters, function results, recursion, mutual
recursion (FORWARD), nested procedures (static-link display),
open-array VAR formals.CLASS: fields, methods (value/VAR, results),
single inheritance, VIRTUAL dynamic dispatch via vtables,
WITH, hidden THIS, class BEGIN … END init bodies.PIM SYSTEM.PROCESS, NEWPROCESS, TRANSFER, IOTRANSFER
(ucontext-backed). IOTRANSFER degrades to a plain transfer.
Length-prefixed arrays (count + elements), deep record copy,
count-checked whole-array assign, runtime bounds/span traps
($abort, rc 134), multi-word sets, alloc8 heap (malloc/free),
deterministic %tN/@LN, whole-image buffering, REAL const flush,
string literals as descriptors, vtables.
runtime/syslib (always linked): SysShim, FileIO, Utf8.
stdlib (opt-in): SysIO, TextIO (+ UTF-8), WholeIO, Math,
Strings, CharClass, Files, Conversions, RealIO,
ProgramArgs, SysClock, IOChan, Storage, plus the gm2/ISO set
added this session:
| Area | Modules |
|---|---|
| conversion | ConvTypes, WholeStr, RealStr, LongStr, LongMath, LongIO, LongWholeIO |
| text IO | StrIO, InOut, StdIO, STextIO, SWholeIO, SRealIO, SIOResult, IOConsts |
| runtime | DynamicStrings (core), SysStorage, TERMINATION |
GOTO and labels — parse error. ⏸docs/analysis_generics.md).F()[i] := x and
F()^.f := x are not accepted (expression suffixes are). ⏸F().M() — not accepted. ⏸docs/OOP.txt).GOTO-free result suffixes only; no EXIT from a nested named
loop etc.ChanConsts, GenDevIF,
DeviceTablePtr, StdChans, StreamFile, FIO. ⏸wrapclock/wraptime/wrapc, TimeString. ⏸DynamicStrings is the core subset (no *DB debug variants,
no InitStringCharStar). 🔄SIOResult). 🔄$abort (rc 134), not a catchable Trap; DISPOSE
is shallow.cd .../m2compiler-V3
./bootstrap/fixpoint.sh # FIXPOINT OK
cd compiler && ./build.sh && ./run_tests.sh # 175/175
G=$HOME/bin/Modula2/Gm2/lib/gcc/x86_64-pc-linux-gnu/16.0.1/m2
V3_LIBS="$G/m2pim:$G/m2iso:$G/m2log:$G/m2cor:$G/m2min" \
tools/v3-corpus/corpus.sh