Parent: #459 Depends on: #465, #461
Goal
Turn the baseline JIT into a general resumable native region tier with precise stack maps, rather than rejecting whole chunks or relying on VM quick kernels for most nonnumeric work.
Current boundary
#52 completed the safe numeric/control baseline. Arithmetic profiles at 93.3% generated leaves, but the saved baseline profile attributes properties and arrays largely to VM kernels/residual dispatch. docs/baseline-jit.md still identifies resumable side exits and precise native stack maps as future work.
Scope
- Compile maximal supported bytecode regions and emit exact side exits at unsupported/effectful boundaries instead of rejecting an otherwise profitable chunk.
- Extend
NativeFramerecovery state for operand stack, accumulator, locals/environments, handler stack, call/construct state, and precise source IP. - Generate precise stack maps at calls, backedges, allocation points, traps, and debugger/termination checkpoints so managed values may safely remain in registers between safepoints.
- Cover ordinary calls, property/index access, allocations, typed operations, exceptions, and structured control through direct code or narrow rooted runtime stubs.
- Add per-opcode/region admission and side-exit counters plus symbolized attribution.
- Preserve immutable publication, W^X, cached rejection, context teardown, epoch retirement, and shared-realm safety.
No-workaround rules
- No benchmark-shaped quick kernel, source recognition, unsafe register root, restart-after-observable-effect exit, or silent step/watchdog undercount.
- A runtime stub must be a narrow semantic operation, not the entire bytecode interpreter hidden behind one native call.
Acceptance
- Forced baseline-off/on differentials cover result, exception, effects, steps, OOM, debugger, termination, recursion, host callbacks, and deoptimization boundaries.
- Moving GC rewrites every mapped live native value; malformed/unpublished maps fail closed.
- No-GIL publication/invalidation/teardown passes normal and TSan races.
- A machine-readable coverage inventory names supported opcodes, region exits, and rejection reasons.
- #461 profiles show dispatch transfer on expanded #460 workloads; retained changes have exact-parent timing and code-size evidence.
- The original #44 matrix has no noise-qualified regression.
Foundation
#52; baseline design; numeric register work began at 79e6ba92.