|
@@ -1,18 +1,18 @@
|
|
|
# Session summary — SET CONST + builtin CONST folding 2026-10-18
|
|
# Session summary — SET CONST + builtin CONST folding 2026-10-18
|
|
|
|
|
|
|
|
-Branch **`resolve-check`**. Suite **231/231**; fixpoint **OK
|
|
|
|
|
-(3,841,894 bytes)**; corpus **396/612 compile-OK, 0 crashes**.
|
|
|
|
|
|
|
+Branch **`resolve-check`**. Suite **232/232**; fixpoint **OK
|
|
|
|
|
+(3,842,262 bytes)**; corpus **397/612 compile-OK, 0 crashes**.
|
|
|
|
|
|
|
|
Tags: `v3-set-constants`, `v3-const-builtin-fold`, `v3-const-conv-fold`,
|
|
Tags: `v3-set-constants`, `v3-const-builtin-fold`, `v3-const-conv-fold`,
|
|
|
-`v3-array-index-fwd`, `v3-proc-addr`, `v3-proc-val`.
|
|
|
|
|
|
|
+`v3-array-index-fwd`, `v3-proc-addr`, `v3-proc-val`, `v3-real64`.
|
|
|
|
|
|
|
|
## What this session did
|
|
## What this session did
|
|
|
|
|
|
|
|
Landed the two features recorded in `docs/analysis_gaps.md` §9 by the
|
|
Landed the two features recorded in `docs/analysis_gaps.md` §9 by the
|
|
|
previous corpus sweep — **set constants** (static masks) and **builtin
|
|
previous corpus sweep — **set constants** (static masks) and **builtin
|
|
|
calls in `CONST` initialisers** — then went further on `CONST`
|
|
calls in `CONST` initialisers** — then went further on `CONST`
|
|
|
-initialisers, forward type references, and procedure values. Corpus
|
|
|
|
|
-**382 → 396** (+14 files, 0 crashes).
|
|
|
|
|
|
|
+initialisers, forward type references, procedure values, and SYSTEM
|
|
|
|
|
+sized reals. Corpus **382 → 397** (+15 files, 0 crashes).
|
|
|
|
|
|
|
|
```mod
|
|
```mod
|
|
|
CONST Digits = CharSet{"0".."9"}; (* char range *)
|
|
CONST Digits = CharSet{"0".."9"}; (* char range *)
|
|
@@ -102,6 +102,12 @@ variable, mapped onto `ADDRESS`): added `PROC`↔`PTR` assignability.
|
|
|
`procconv` now passes and runs. Corpus **393 → 396**; suite tests
|
|
`procconv` now passes and runs. Corpus **393 → 396**; suite tests
|
|
|
`t_procaddr`, `t_procval`.
|
|
`t_procaddr`, `t_procval`.
|
|
|
|
|
|
|
|
|
|
+## SYSTEM sized reals
|
|
|
|
|
+
|
|
|
|
|
+`REAL32`/`REAL64` (SYSTEM) were undeclared; mapped onto V3's `REAL`
|
|
|
|
|
+(`dReal`), so `MIN(REAL64)`/`MAX(REAL64)` fold. Corpus **396 → 397**;
|
|
|
|
|
+suite test `t_real64`.
|
|
|
|
|
+
|
|
|
## Not fixed (recorded)
|
|
## Not fixed (recorded)
|
|
|
|
|
|
|
|
- **`setconst3.mod`** still fails: its `VAR mem: ARRAY [0..CARDINAL(
|
|
- **`setconst3.mod`** still fails: its `VAR mem: ARRAY [0..CARDINAL(
|
|
@@ -110,22 +116,21 @@ variable, mapped onto `ADDRESS`): added `PROC`↔`PTR` assignability.
|
|
|
parses.
|
|
parses.
|
|
|
- Forward *type* references in a `CONST` conversion (`subrange4`/`7`)
|
|
- Forward *type* references in a `CONST` conversion (`subrange4`/`7`)
|
|
|
and as a `VAR` type before its TYPE block (`subrange11`);
|
|
and as a `VAR` type before its TYPE block (`subrange11`);
|
|
|
- `minmaxreal3` (SYSTEM `REAL64`); `procconv2` (`CONVERT`);
|
|
|
|
|
- `tinyproc2`/`tinyproc4` (bare procedure value as a statement); the
|
|
|
|
|
- `imp*` qualified-import family (partly a corpus-harness
|
|
|
|
|
- transitive-`.def` gap).
|
|
|
|
|
|
|
+ `procconv2` (`CONVERT`); `tinyproc2`/`tinyproc4` (bare procedure value
|
|
|
|
|
+ as a statement); the `imp*` qualified-import family (partly a corpus
|
|
|
|
|
+ harness transitive-`.def` gap).
|
|
|
|
|
|
|
|
## Files
|
|
## Files
|
|
|
|
|
|
|
|
`compiler/src/Lower.{def,mod}` (evaluator + `PoolSet` call + `ADR(proc)`),
|
|
`compiler/src/Lower.{def,mod}` (evaluator + `PoolSet` call + `ADR(proc)`),
|
|
|
`compiler/src/QbeGen.{def,mod}` (`PoolSet`/`FlushSets`/pool state),
|
|
`compiler/src/QbeGen.{def,mod}` (`PoolSet`/`FlushSets`/pool state),
|
|
|
`compiler/src/SymTab.{def,mod}` (forward array-index deferral;
|
|
`compiler/src/SymTab.{def,mod}` (forward array-index deferral;
|
|
|
-proc-value assignability),
|
|
|
|
|
|
|
+proc-value assignability; sized reals),
|
|
|
`compiler/src/M2.atg` (`ConstDecl`, `Design`, `CAP`/`ABS`/`ODD` folds,
|
|
`compiler/src/M2.atg` (`ConstDecl`, `Design`, `CAP`/`ABS`/`ODD` folds,
|
|
|
`VAL` conversion folds, array-index defer, proc-value conversions),
|
|
`VAL` conversion folds, array-index defer, proc-value conversions),
|
|
|
`compiler/tests/t_setconst.mod`, `t_bad_setconst.mod`,
|
|
`compiler/tests/t_setconst.mod`, `t_bad_setconst.mod`,
|
|
|
`t_constbuiltin.mod`, `t_constreal.mod`, `t_constlong.mod`,
|
|
`t_constbuiltin.mod`, `t_constreal.mod`, `t_constlong.mod`,
|
|
|
-`t_arrfwd.mod`, `t_procaddr.mod`, `t_procval.mod`,
|
|
|
|
|
|
|
+`t_arrfwd.mod`, `t_procaddr.mod`, `t_procval.mod`, `t_real64.mod`,
|
|
|
`compiler/run_tests.sh`.
|
|
`compiler/run_tests.sh`.
|
|
|
|
|
|
|
|
## Resume
|
|
## Resume
|
|
@@ -133,7 +138,7 @@ proc-value assignability),
|
|
|
```sh
|
|
```sh
|
|
|
cd .../m2compiler-V3
|
|
cd .../m2compiler-V3
|
|
|
git checkout resolve-check
|
|
git checkout resolve-check
|
|
|
-cd compiler && ./build.sh && ./run_tests.sh # 231/231
|
|
|
|
|
|
|
+cd compiler && ./build.sh && ./run_tests.sh # 232/232
|
|
|
cd .. && TMP="$PWD/.scratch/fixpoint" ./bootstrap/fixpoint.sh
|
|
cd .. && TMP="$PWD/.scratch/fixpoint" ./bootstrap/fixpoint.sh
|
|
|
-M2FLAGS="" ./.scratch/corpusx.sh # 396 OK, 0 crash
|
|
|
|
|
|
|
+M2FLAGS="" ./.scratch/corpusx.sh # 397 OK, 0 crash
|
|
|
```
|
|
```
|