CHECKPOINT-COMPILER-API: record that the real lowering-time Context is blocked by issue 0141
This commit is contained in:
@@ -346,6 +346,24 @@ when reached (sentinels or accessor fns; see the design doc Risks).
|
||||
`List` growth; orthogonal, see `current/CHECKPOINT-METATYPE.md`.)
|
||||
|
||||
## Log
|
||||
- **Phase 3 P3.4 — investigation: the "real lowering-time Context" is BLOCKED by issue 0141 (2026-06-18).**
|
||||
Probed whether the VM needs a REAL lowering-time `Context` (CAllocator thunk func-refs) for
|
||||
allocating type-fns. **Finding: lowering-time comptime ALLOCATION fails in the LEGACY interp
|
||||
too** — a type-fn that calls `context.allocator.alloc_bytes` at lowering time bails in legacy
|
||||
with `comptime call_indirect: callee is not a func_ref Value (raw fn-pointers from extern calls
|
||||
aren't dispatchable in interp)`, and the VM bails at parity (`call_indirect through a null
|
||||
function pointer`). This is exactly issue **0141**'s root cause (its analysis already notes "the
|
||||
null allocator is the same story for the CAllocator thunks") — an OPEN deferred issue. So:
|
||||
(1) the VM is CORRECT (parity — both bail; no regression); (2) the real-context work is
|
||||
PREMATURE — its only consumer (allocating lowering-time type-fns) can't pass gate-OFF, so no
|
||||
corpus test can validate it, and even a more-capable VM can't ship a divergence during the
|
||||
dual-path phase. **Consequence for the metatype re-expression:** re-expressing `define`/`make_enum`
|
||||
over the compiler-API needs to BUILD `[]Member` slices dynamically (allocation) — which is
|
||||
blocked by 0141 at lowering time. The viable paths are: (a) avoid allocation by passing the
|
||||
caller's existing slice through (needs `EnumVariant`/`StructField` to be usable AS `Member` —
|
||||
they're layout-identical `{string, Type}`, but distinct nominal types — a metatype-API decision),
|
||||
or (b) wait for 0141. **No code change this step** (the VM already bails correctly). Recorded so
|
||||
the next session doesn't re-derive it. 697/0 both gates unchanged.
|
||||
- **Phase 3 P3.4 step 5 (VM plan) — WRITE side ported to the VM → FIRST HANDLED lowering-time type-fns (2026-06-18).**
|
||||
Ported `declare_type` / `pointer_to` / `register_type` into `Vm.callCompilerFn`, mirroring the
|
||||
legacy `compiler_lib` handlers (mint via `@constCast(table)` — the same mutable access the
|
||||
|
||||
Reference in New Issue
Block a user