ReviewOS

zig-utils/zig-js

JIT: implement full x86-64 baseline and optimizer backends

#484
Open chris opened this 8 days ago ·
8 days ago

Parent: #459 Depends on: #483

Goal

Implement full x86-64 baseline and optimizing JIT backend parity for macOS and Linux using the owned backend contract.

Scope

  • Encode required integer, FP/SSE2+, branch, call, stack, atomic/patch, barrier, conversion, and SIMD operations with explicit CPU feature tiers.
  • Implement the stable native frame/runtime-operation ABI, register allocation, spills, parallel copies, safepoints/stack maps, OSR/deopt, direct property/index fast paths, call links, invalidation, and artifact retirement.
  • Match every operation and recovery outcome in the declared macOS AArch64 optimizer inventory; unsupported CPU features select an owned lower encoding or explicit tier fallback.
  • Add exact instruction/relocation fixtures and target-specific ABI tests for SysV and macOS x86-64.
  • Publish comparable correctness and performance evidence on real x86-64 hardware.

No-workaround rules

  • No Rosetta/emulation evidence presented as native support, no external assembler/JIT, no feature silently omitted behind baseline/bytecode fallback, and no reduced correctness matrix.

Acceptance

  • The optimizer inventory declares macOS and Linux x86-64 gated, with zero unexpected publication fallback.
  • Forced-off/on seeded differentials, moving GC, exceptions, debugger/termination, OOM, no-GIL, TSan, artifact lifetime, and full unit/corpus gates match AArch64 coverage.
  • All #460 rows publish tier attribution and real-hardware samples for declared x86 hosts.
  • Original benchmark workloads have no backend-specific checksum/tier divergence.
  • Build/install remains free of external codegen/runtime dependencies.

Foundation

The current inventory explicitly records x86-64 as fallback with zero optimizer publications: docs/.data/optimizer-release-inventory.json.

Sign in to comment on this issue.