Parent: #44 Successors: #132 (native property regions), #133 (native packed-array regions) Related completed work: #46, #47, #48, #53, #56
Completed baseline
The general baseline native-code tier is implemented and documented in https://github.com/zig-utils/zig-js/blob/main/docs/baseline-jit.md. It includes race-safe tier publication, context-owned W^X executable mappings, a stable native frame ABI, guarded numeric/control-flow lowering, register-resident values, exact step/checkpoint/GC semantics, deterministic fallback, and Context.Options.enable_jit = false for differential validation.
The July 15 complete matrix beats JSC in all directly comparable rows. The saved July 16 symbolized profile now proves the execution boundary:
- arithmetic: 93.3% of reported leaves in generated
MAP_JITcode; zero residualrunChunkleaves; - properties: guarded VM kernels plus 36.9% residual
runChunkleaves; - arrays: 65.3% residual
runChunkleaves plus dense-array runtime helpers; - recursive Fibonacci: 96.6% in the guarded observable recurrence kernel; zero residual
runChunkleaves.
Profile: https://github.com/zig-utils/zig-js/blob/main/docs/.data/baseline-jit-profile-2026-07-16.md Publication: https://github.com/zig-utils/zig-js/blob/main/docs/.data/benchmark-comparison-2026-07-15-128-byte-slab.md
Broader native coverage is now split into evidence-specific successors #132 and #133 instead of leaving the completed baseline milestone indefinitely open.
Acceptance
- Document native frame layout, Value representation, calling convention, safepoints, exception transfer, and invalidation.
- Add native-on/off differential tests for results, fallback, exact steps, and visible effects.
- Reject unsupported property/array opcodes rather than executing stale assumptions.
- Preserve precise GC/checkpoints, stack limits, closures/upvalues, arguments, eval, generators/async fallback, and no-GIL ownership.
- Keep unsupported functions on deterministic bytecode fallback.
- Pass focused semantic, full GC/no-GIL, and suppression-free TSan validation.
- Save symbolized profiles separating generated code, VM quickening/runtime kernels, and residual dispatch.
- Beat JSC in every directly comparable benchmark row with the sibling workload work.
- Document build/runtime support and expose a deterministic disable switch.