|
|
@@ -1,11 +1,12 @@
|
|
|
# Session summary — SET CONST + builtin CONST folding 2026-10-18
|
|
|
|
|
|
-Branch **`resolve-check`**. Suite **233/233**; fixpoint **OK
|
|
|
-(3,842,992 bytes)**; corpus **398/612 compile-OK, 0 crashes**.
|
|
|
+Branch **`resolve-check`**. Suite **234/234**; fixpoint **OK
|
|
|
+(3,843,693 bytes)**; corpus **388/612 compile-OK, 0 crashes**.
|
|
|
|
|
|
Tags: `v3-set-constants`, `v3-const-builtin-fold`, `v3-const-conv-fold`,
|
|
|
`v3-proc-addr`, `v3-proc-val`, `v3-real64`, `v3-shift-import`,
|
|
|
-`v3-foreign-module`, `v3-gap-examples`.
|
|
|
+`v3-foreign-module`, `v3-m2-conformance`, `v3-strict-decl-order`,
|
|
|
+`v3-gap-examples`.
|
|
|
|
|
|
## Conformance note
|
|
|
|
|
|
@@ -24,7 +25,7 @@ previous corpus sweep — **set constants** (static masks) and **builtin
|
|
|
calls in `CONST` initialisers** — then went further on `CONST`
|
|
|
initialisers, procedure values, SYSTEM sized reals, builtin imports, and
|
|
|
ISO foreign modules. (A forward-type-reference change was added and then
|
|
|
-reverted for conformance; see the note at the top.) Corpus **382 → 398**
|
|
|
+reverted for conformance; see the note at the top.) Corpus **382 → 388**
|
|
|
(+16 files, 0 crashes).
|
|
|
|
|
|
```mod
|
|
|
@@ -139,6 +140,21 @@ suite test `t_shiftneg`.
|
|
|
(ISO foreign-module syntax) are now parsed; `v.def` → 0 errors. Corpus
|
|
|
**399 → 400**; suite session test `CForeignProg`.
|
|
|
|
|
|
+## Conformance: strict declaration order (Track A, first cut)
|
|
|
+
|
|
|
+`TypeIdent` no longer invents a forward placeholder for an undeclared
|
|
|
+type: a new `allowFwdType` flag is set **only** while parsing a
|
|
|
+`POINTER`'s base type (Modula-2's single forward-reference exception), so
|
|
|
+module-level forward type/`VAR` references, forward types inside a
|
|
|
+`TYPE` block, and forward `SET OF <type>` are now `201`. The compiler's
|
|
|
+own sources (and runtime/stdlib) do not rely on it — fixpoint stays
|
|
|
+green. `t_fwdtype`/`t_fwdset` became reject tests; `t_ptrfwd` locks the
|
|
|
+legal exception. Corpus **398 → 388**: the 10 files dropped
|
|
|
+(`arrayptr`, `arrayptr6`, `constructor1`, `constructor3`, `param3`,
|
|
|
+`record14.def`–`record16.def`, `tinyset6`, `tinyset7`) were gm2
|
|
|
+leniency. Forward references to module-level **variables**/**procedures**
|
|
|
+from a body (the two-phase parse) remain — a separate, larger item.
|
|
|
+
|
|
|
## Not fixed (recorded)
|
|
|
|
|
|
- **`setconst3.mod`** still fails: its `VAR mem: ARRAY [0..CARDINAL(
|
|
|
@@ -168,7 +184,8 @@ modules),
|
|
|
`compiler/tests/t_setconst.mod`, `t_bad_setconst.mod`,
|
|
|
`t_constbuiltin.mod`, `t_constreal.mod`, `t_constlong.mod`,
|
|
|
`t_procaddr.mod`, `t_procval.mod`, `t_real64.mod`,
|
|
|
-`t_shiftneg.mod`, `c_foreign.def`, `c_foreign.mod`, `c_foreign_prog.mod`,
|
|
|
+`t_shiftneg.mod`, `t_ptrfwd.mod`, `t_fwdtype.mod`, `t_fwdset.mod`,
|
|
|
+`c_foreign.def`, `c_foreign.mod`, `c_foreign_prog.mod`,
|
|
|
`compiler/run_tests.sh`.
|
|
|
|
|
|
## Resume
|
|
|
@@ -176,7 +193,7 @@ modules),
|
|
|
```sh
|
|
|
cd .../m2compiler-V3
|
|
|
git checkout resolve-check
|
|
|
-cd compiler && ./build.sh && ./run_tests.sh # 233/233
|
|
|
+cd compiler && ./build.sh && ./run_tests.sh # 234/234
|
|
|
cd .. && TMP="$PWD/.scratch/fixpoint" ./bootstrap/fixpoint.sh
|
|
|
-M2FLAGS="" ./.scratch/corpusx.sh # 398 OK, 0 crash
|
|
|
+M2FLAGS="" ./.scratch/corpusx.sh # 388 OK, 0 crash
|
|
|
```
|