HEAD: abc41a7 — tag v3-step4.3, milestone tag v3-step4.
Suite 87/87 (44 run — incl. 4 trap-aborts + 4 sessions — +
43 reject). Build is warning-free (only the known-benign Coco
TypeBlock LL(1) advisory). Tree clean except untracked git.txt
(push recipe, intentional). No remote configured.
v3-step4.1 (79/79) — calls: value/VAR params, function
results, recursion, FORWARD, open-array VAR formals,
int→real argument conversion; frames with entry copies and
stack-slot locals; 233 invalid call. Two backend bugs fixed:
nested-call state clobber (16-deep call stack) and uninitialized
stack slots (zero-init locals).v3-step4.2 (82/82) — nested procedures: static-link display
(alloc8 link records, chain walking for up-level load/store/
address), lexical ProcDepthOf; bare P; parameterless calls.
QBE can't nest definitions, so nested bodies hoist via
per-nesting-depth buffers (nestBufs).v3-step4.3 (87/87) — separate compilation: single-image
sessions (lib.def lib.mod prog.mod → one <Prog>.ssa),
module registry + scopes, FROM/IMPORT, qualified L.x via
materialization, opaque TYPE T; completion, module BEGIN as
<mod>_init called from main, whole-image buffering written
under the program module's name.SetTarget on the definition's alias;
clients use them behind pointers only.<proc>_<uid> (uid per compilation);
definitions and implementations agree because the implementation
resumes the definition's proc node (ResumeProc).DISPOSE nils and is shallow; nil-deref raw; classic idents.Strict 231 signature checking for impl-vs-def headings (arity is
checked; parameter/result types are not), procedure-type variables
and indirect calls, HIGH/LEN, variant records, import cycles,
class lowering (vtable/THIS), enum literals, F()^ result
suffixes, >64 locals, recursive DISPOSE.
Per docs/plan.md and the Blaise map (docs/blaise-phases-map.md):
stdlib/ with classic DEFINITION/IMPLEMENTATION + OPAQUE
forms (no R10 INTERFACE/blueprints/operator-procedures), semantics
from Benjamin/Actual/m2bsk-master/r10/stdlib/*.if:
Strings, TextIO (+ UWrite*), WholeIO, Math, Files, over
runtime/syslib (SysIO/Storage). This is the first phase that
exercises the new separate-compilation machinery with real
libraries.
cd /home/eric/Projets/Projets-Modula2/MyWork/m2compiler-V3/compiler
./build.sh && ./run_tests.sh # expect 87/87, zero gm2 warnings