plan: Phase 4 — retire the legacy interp (ONE-evaluator end state)
Audited the 5 roles interp.zig still serves (A comptime folds, B #insert, C post-link bundler, D #compiler hooks, E bail diagnostics) and the shared substrate (Value tagged union + host_ffi bridge). User decision: UNIFY — the VM gains a host-FFI escape + real-pointer translation and runs the post-link bundler too; interp.zig fully deleted. Dependency-ordered sub-phases recorded in PLAN-COMPILER-VM.md: 4A finish comptime ops (box_any/unbox_any, out/print, global_addr, trace) -> 4B VM-native diagnostics -> 4C #insert -> 4D host FFI + #compiler hooks -> 4E post-link bundler (+ dedicated bundle tests) -> 4F flip default + delete interp.zig/Value + re-express define/make_enum over the compiler-API. No code change — planning + checkpoint only.
This commit is contained in:
@@ -34,11 +34,16 @@ with ONE welded mechanism. Branch: `reify` (off `master`). Update after every st
|
||||
> `0632` runs **HANDLED with ZERO fallback** (incl. the `define(declare, type_info(T))` round-trips
|
||||
> `0619`/`0622`/`0623`); VM output byte-matches legacy. `enum_init`/`define`/`type_info` bail loudly
|
||||
> on a `backing_type` tagged union rather than silent-clobber. **697/0 BOTH gates + all unit tests.**
|
||||
> **THE NEXT STEP:** drive the remaining VM fallbacks (now ALL genuinely-non-metatype emit-time side
|
||||
> effects — `print`/`out` 0613, `global_addr` 0600, `compiler_call` #compiler hooks 0602/0603,
|
||||
> inline-asm global 1654) to empty (port or confirm each is legitimately non-comptime), THEN — with
|
||||
> explicit user go-ahead — flip the VM to default + delete `interp.zig` (the end-state ONE evaluator),
|
||||
> and re-express `define`/`make_enum` as sx over the compiler-API (allocation works on the sole VM).
|
||||
> **THE NEXT STEP — Phase 4 (legacy-interp retirement) is now PLANNED in `PLAN-COMPILER-VM.md`.**
|
||||
> Audited the 5 roles the legacy interp still serves (A comptime folds · B `#insert` · C post-link
|
||||
> bundler · D `#compiler` hooks · E bail diagnostics). **User decision (2026-06-18): UNIFY** — the VM
|
||||
> gains a host-FFI escape + real-pointer translation and runs the post-link bundler too; `interp.zig`
|
||||
> fully deleted (true ONE evaluator). Dependency-ordered sub-phases: **4A** finish comptime ops
|
||||
> (box_any/unbox_any · out/print · global_addr · trace) → **4B** VM-native diagnostics → **4C**
|
||||
> `#insert` → **4D** host FFI + `#compiler` hooks → **4E** bundler (+ dedicated bundle tests, no
|
||||
> corpus guard) → **4F** flip default + delete `interp.zig`/`Value` + re-express `define`/`make_enum`.
|
||||
> Starting at **4A.1 (box_any/unbox_any)**. See `PLAN-COMPILER-VM.md` → Phase 4 for the full plan +
|
||||
> top risks (flat-pointer escape on buffer realloc; bundler test coverage).
|
||||
> Earlier landed: dedicated `Type` builtin TypeId (`6844fb9`/`94f60c5`/`554871b`); WRITE side
|
||||
> declare_type/register_type/pointer_to VM-native (`66005af`); real lowering-time Context (`eb68d9e`);
|
||||
> metatype construction declare/define/enum_init (`d0ebc55`).
|
||||
|
||||
Reference in New Issue
Block a user