Roadmap after step 7 (backend listing). Order is priority order; each step keeps the full suite green with no cascades.
Scope (finishes the step-5 library story: information hiding):
TYPE T; (opaque declaration) in DEFINITION; the full
declaration in IMPLEMENTATION (TYPE T = RECORD ... END;).T is usable only behind
POINTER TO T, as a VAR formal type, and for assignment
between same-opaques. No client VAR of type T, no field
access, no construction, no value parameters or function
results of opaque type (all static 230s/201s).Design deltas (vs step 7):
TYPE ident ; alternative in definitions (mid-rule:
TYPE T = ... stays); implementation TYPE accepts the
completion (name/type match, else 221-ish/230).Acceptance (same bar):
Suggested first tests:
DCounter-style ADT (New returns pointer, Inc/Get),
completion mismatch (different base → reject), client
VAR x : T → reject, p^.field from client → reject.Scope: TYPE H = PROCEDURE (INTEGER): INTEGER; variables,
procedure constants as values, calls through variables, handlers
as actuals. Requires a VM design spike first: no direct indirect-
call opcode exists (CE jump_stack = bare computed jump; return
linkage/frames must be designed, possibly a new opcode or a
linkage convention in MGen). Do NOT start emitting before the
spike lands in mc64-spec.md.
Scope: 64-bit LONGINT/LONGCARD (0C5–CC), LONGREAL quads
(0x12), literals, conversions, full operator lowering, print
helper extension. Large but mechanical: lexer, descriptors, every
operator family, mixed-type rules. (Predefs currently alias to
32-bit/64-bit-float as placeholders.)
.MC4 emission with depCount loading (loader path is
proven by STAK/DEP; the emitter side is the work).DumpImage (needs positions on AST
nodes: grammar + AST + backend change).WITH-field / CHAR tails as VAR actuals, open-to-open
array passing, circular imports (v1 hardening list, unchecked
here so far).