You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the [lynx-perf-s2] code-staged roadmap (sequel to #9). Depends on #16 for target-setting but can start in parallel: with the flag off this PR is behavior-neutral by construction.
Scope (one PR)
Give compile-universal an MT-layer emission mode: for each universalPlan, emit a module exporting
create(instance) — straight-line host-driver calls materializing the plan's static skeleton (no tree walk, no dispatch), returning the element/handle topology the interpretive path would have produced;
a per-slot setter table — set[slot](element, value) where the prop kind (class/attr/text/event-token) is resolved at compile time (consumed by s2-3, shipped here so codegen lands once).
Keyed by the content-derived planId from PR #12 — the negotiated plan identity is already the registry key. Off by default behind a build flag.
Design constraints (each is a lesson already paid for)
Fallback-safe: an unregistered/mismatched planId falls back to the interpretive path (vue +b:c precedent, including its fail-safe shape). The interpreter is not removed by this PR.
No AST mutation — codegen is copy-on-write over the parsed plan (repo rule; tests deep-freeze).
Plans remain in the bundle wherever the BG slice needs them; net slice arithmetic (+codegen, −interpreter later) belongs to s2-4, but per-plan codegen bytes are measured and recorded here.
Acceptance
Differential suite: compiled vs interpreted produce byte-identical element trees and identical handle/adoption topology across the fixture corpus + the rig app (both slices' consumers).
Flag off ⇒ default build output byte-identical (gate).
Codegen-size counters recorded per plan (deterministic, into the codegen/bundle benchmark family).
Red-checked both ways: break a setter's prop kind ⇒ differential suite fails; corrupt a planId ⇒ fallback path serves and dev cross-check reports.
Closed by #16's measurement gate before starting: the downstream consumers (#18/#20) measured below the 10% direct-share threshold on the SG1 quiet host (plan interpretation 5.4% of FCP, mt_expand 2.5% of create, receiver eval 0.8%), so the emission target has nothing gate-clearing to feed. Full tables and stop rationale: #21 (comment) and the gate-outcome section of #21. Reopen only if a new measurement re-clears the gate.
Live-main audit (2026-08-11): this remains correctly closed. The exact compiler MT-emission proposal is superseded by octanejs#693/octanejs#700 template programs/runs and direct dense host execution. No old patch should be revived.
Activity
Huxpro commentedon Aug 10, 2026
Closed by #16's measurement gate before starting: the downstream consumers (#18/#20) measured below the 10% direct-share threshold on the SG1 quiet host (plan interpretation 5.4% of FCP, mt_expand 2.5% of create, receiver eval 0.8%), so the emission target has nothing gate-clearing to feed. Full tables and stop rationale: #21 (comment) and the gate-outcome section of #21. Reopen only if a new measurement re-clears the gate.
Generated by Claude Code
Huxpro commentedon Aug 11, 2026
Live-main audit (2026-08-11): this remains correctly closed. The exact compiler MT-emission proposal is superseded by octanejs#693/octanejs#700 template programs/runs and direct dense host execution. No old patch should be revived.