Skip to content

VM: build a fast no-JIT execution tier for restricted hosts #498

Description

@chrisbbreuer

Parent: #459
Depends on: #465, #461
Related: #466, #481, #500

Goal

Build a genuinely fast no-JIT execution tier for platforms, deployments, and security policies that cannot publish executable memory.

Current boundary

The tree-walker is the semantic baseline and the VM primarily provides suspend/resume, deep recursion, proper tail calls, and native-tier substrate. Existing quick kernels accelerate selected shapes, but there is no declared broad no-JIT performance contract. #465 makes correct code bytecode-eligible; this issue makes that bytecode competitive without executable mappings.

Scope

  • Establish interpreter/VM attribution for every Bench: define the representative dependency-free performance matrix #460 workload with native tiers forcibly disabled.
  • Implement general adaptive quickening, typed/specialized bytecodes, superinstructions, inline caches, threaded or otherwise efficient dispatch supported by Zig, activation/frame reuse, and narrow runtime helpers.
  • Specialize property/index/call/arithmetic/control/allocation paths from runtime observations with exact versioned guards and dequickening.
  • Preserve debugger/statement hooks, step/watchdog accounting, exceptions/finally, async/generator suspension, proper tail calls, moving GC roots, invalidation, OOM, and no-GIL synchronization.
  • Bound quickened metadata/code growth and reset it safely on invalidation, realm teardown, memory pressure, or changed assumptions.
  • Publish no-JIT cold/warm, code/metadata memory, latency, and 1/8-context evidence independently from JIT results.

No-workaround rules

  • No source/function/benchmark recognizer, giant semantic-shape kernel, computed-result cache, disabled checks/hooks/GC, unsafe direct object storage, or fallback to a native executable mapping.
  • A quick path must be a general bytecode/runtime specialization with exact miss and dequickening behavior.

Acceptance

  • A machine-readable bytecode/quickening coverage and rejection inventory names every specialization and remaining dispatch family.
  • Forced tree-walker/VM and quickening-off/on differentials match result, exception, effects, steps, jobs, debugger behavior, OOM, termination, and teardown.
  • Moving GC, no-GIL, TSan, test262, PR-249, generators/async, threadfuzz, and fault gates pass with JIT unavailable.
  • Perf: add causal attribution and exact-parent regression infrastructure #461 profiles prove dispatch/runtime reductions across predeclared Bench: define the representative dependency-free performance matrix #460 rows with bounded metadata/RSS.
  • No-JIT performance and memory are published for every declared restricted platform; fallback is not counted as a native-tier success.

Foundation

Existing VM quickening and activation-stack work live in src/vm.zig; current architectural boundary is documented in docs/architecture.md and docs/advanced/execution-tiers.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjitBytecode, baseline JIT, optimizer, and code generationperformanceMeasured runtime, memory, scaling, or build performanceruntimeJavaScript runtime and builtin implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions