|
|
@@ -0,0 +1,93 @@
|
|
|
+# Session 2026-10-24 — open-array M6 (pointer-based 1-D views)
|
|
|
+
|
|
|
+Final open-array milestone: internal 1-D open formals now use the same
|
|
|
+`ArrayView` ABI as multi-dimensional arrays, while external C keeps the
|
|
|
+legacy `{count,data}` descriptor at the boundary. M6 also does the
|
|
|
+final docs/gates/tag pass.
|
|
|
+
|
|
|
+**Branch:** `master`. **Feature state:** `v3-open-arrays`.
|
|
|
+**Gates at the end:** suite **300/300**, fixpoint **OK
|
|
|
+(3,571,371 bytes)**, corpus **518/612 compile-OK, 0 crashes**.
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+## Numbers
|
|
|
+
|
|
|
+| gate | start (M5) | end (M6) |
|
|
|
+| --- | --- | --- |
|
|
|
+| suite (`compiler/run_tests.sh`) | 299/299 | **300/300** |
|
|
|
+| fixpoint (`bootstrap/fixpoint.sh`) | 3,534,072 B | **3,571,371 B** |
|
|
|
+| corpus (`tools/v3-corpus/corpus.sh`) | 518/612 | **518/612, 0 crashes** |
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+## What landed
|
|
|
+
|
|
|
+### Pointer-based 1-D open views
|
|
|
+
|
|
|
+- `MakeOpen1DView` builds a 40-byte
|
|
|
+ `{count, elemBytes, stride, base, next=0}` view from:
|
|
|
+ - a fixed or open 1-D array descriptor;
|
|
|
+ - a string / UString literal;
|
|
|
+ - a row or multi-dimensional subview;
|
|
|
+ - a byte-flattened multi array (`ARRAY OF BYTE`/`SBYTE`);
|
|
|
+ - a scalar byte-buffer compatibility value.
|
|
|
+- `LowerDesign` treats open 1-D formals as views (`lastView`); indexing
|
|
|
+ uses `ViewIndex`, `HIGH`/`LEN` read the view count, payload `SIZE`
|
|
|
+ uses view metadata, and `ADR` returns `base`.
|
|
|
+- `VAR` writes go directly to the caller's payload; row `ADR` identity
|
|
|
+ is preserved through internal calls.
|
|
|
+
|
|
|
+### External C boundary
|
|
|
+
|
|
|
+- External procedures still receive the legacy `{count,data}`
|
|
|
+ descriptor:
|
|
|
+ - known views are materialized into a temporary legacy descriptor
|
|
|
+ (with the CHAR/UCHAR terminator);
|
|
|
+ - `VAR` results are copied back and the temporary is freed;
|
|
|
+ - fixed 1-D arrays/string literals passed directly to C keep the old
|
|
|
+ descriptor.
|
|
|
+- `SysShim`/`FileIO` gained `GetEnv`/`getenv` support for bootstrap
|
|
|
+ mode (see below).
|
|
|
+
|
|
|
+### Bootstrap compatibility
|
|
|
+
|
|
|
+The stage-2 self-host compiler miscompiled when compiler units were
|
|
|
+themselves built with the view call ABI. The fixpoint now sets
|
|
|
+`V3_LEGACY_OPEN1D=1`:
|
|
|
+
|
|
|
+- compiler units are built with the legacy 1-D call ABI;
|
|
|
+- the resulting compiler still emits pointer-based views for user
|
|
|
+ programs when the variable is absent;
|
|
|
+- the suite runs without the variable, so all user-facing tests
|
|
|
+ exercise the new view ABI.
|
|
|
+
|
|
|
+`M2make` gained an optional `--m2flag` pass-through; the fixpoint uses
|
|
|
+the environment variable instead.
|
|
|
+
|
|
|
+### Test coverage
|
|
|
+
|
|
|
+Added `t_open_row_adr`: a row subview passed to a 1-D open `VAR`
|
|
|
+formal must preserve `ADR` identity. Existing open-array, record,
|
|
|
+constructor and compiler-session tests remain green.
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+## Remaining
|
|
|
+
|
|
|
+No open-array milestone work remains. Possible future language work is
|
|
|
+outside this feature (for example coroutine/protection exceptions and
|
|
|
+the separate-compilation/library-folder plan).
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+## Commits and tags
|
|
|
+
|
|
|
+| commit | tag | work |
|
|
|
+| --- | --- | --- |
|
|
|
+| `04ab8b5` | `v3-open-arrays-m5` | flat record fields and constructors |
|
|
|
+| this code commit | `v3-open-arrays` | pointer-based 1-D views + final gates |
|
|
|
+| this docs commit | `v3-open-arrays-m6-summary` | final summary/docs |
|
|
|
+| final docs commit | `v3-session-2026-10-24-open-arrays-m6-end` | session tag |
|
|
|
+
|
|
|
+No push was performed.
|