ReviewOS

zig-utils/zig-js

JIT: complete optimizer backends and publish differential evidence

#434
Closed chris opened this 9 days ago ·
9 days ago

Parent: #146 Unblocks: #147, #246 Depends on: #431, #432, #433, #132, #133

Finish every declared optimizer backend and publish the evidence needed to close #146 without overstating unsupported targets or workloads.

Acceptance

  • Implement every architecture backend in the declared supported matrix, with W^X/JIT entitlement and executable-memory failure behavior.
  • Differential-test the full supported optimizer surface against interpreter and baseline tiers, including randomized IR/guard/deopt cases.
  • Run focused normal/no-GIL/leak/sanitizer/TSan suites and publish machine-readable pass/fail/skip inventories.
  • Publish reproducible single-thread and multithread performance evidence against JavaScriptCore from committed raw artifacts.
  • Update README and detailed docs from the final committed artifacts; distinguish optimizer correctness coverage from benchmark coverage.
  • Make unsupported hosts/features fail or fall back explicitly, with no fake tier counters or shell-hook passes.

Completion

The declared optimizer code-generation matrix is exactly macOS AArch64. f4f1ebcd makes that contract executable and adds 24 deterministic serialized/no-GIL source differentials that require real optimizer publication, compare with bytecode, and force representation-guard deoptimization. 9e51e1ff publishes and CI-gates docs/.data/optimizer-release-inventory.json.

Final evidence: 176/176 focused normal and TSan; both 12-seed serialized/no-GIL differentials normal and TSan; 1,452/1,452 full units with zero leaks; macOS and Linux x86-64 fallback builds green; 29/29 benchmark publication tests; 48/48 docs pages. The accepted JavaScriptCore comparison retains its committed raw TSV and is explicitly scoped to its ten kernels rather than the full correctness surface.

9 days ago

Control-flow differential fix in 40d85b3: equal-cost terminal branches now carry their true/false block IDs into backend lowering and emit only the selected branch-local SSA operations before loading the result. The strengthened compiler fixture uses real x + 10 / y + 20 arms; the source-level differential that exposed undefined scratch is clean. Combined evidence: 39/39 lowering and 68/68 runtime tests, normal and TSan. Benchmark scores are unchanged because no benchmark kernel or harness changed.

9 days ago

Differential checkpoint c99dafa/dfb728e/ad39bae: a source-level loop combining an exact exit guard with a shared-latch diamond converges across repeated interpreter/optimizer runs; an irreducible two-entry loop rejects before publication. The combined TSan optimizer gate passes 42/42 lowering and 74/74 runtime tests, with focused normal loop coverage at 9/9 plus the mixed source differential. Published JSC benchmark scores remain unchanged because neither measured kernels nor the harness changed.

9 days ago

Differential checkpoint 149e065/f8a7343/43a8315: loop OSR now owns a sequence of shared-join branch segments after an optional exit prefix, accounting each selected arm incrementally before one final backedge safepoint. The source witness takes both outcomes of two diamonds across optimized iterations and preserves exact result/step convergence. Focused normal loop coverage passes 9/9 plus the source differential; the combined TSan optimizer gate remains 42/42 lowering and 74/74 runtime. JSC benchmark artifacts are unchanged because measured kernels and the harness did not change.

9 days ago

Closed by 9e51e1ff. The checked optimizer inventory declares one backend (macOS AArch64), records 8 correctness surfaces and 8 reproduction suites, validates the committed JavaScriptCore raw/report pair, and is now a bounded CI gate. Unsupported macOS/Linux x86-64 builds pass while optimizer publication remains disabled.

Sign in to comment on this issue.