Skip to content

JIT: trace and relocate movable values in live optimized frames #437

Description

@chrisbbreuer

Parent: #432
Blocks: #429
Related: #336

Use precise optimizer stack maps to make live optimized frames safe under moving collection.

Acceptance

  • Classify every live frame, spill, scratch, and register value at each optimizer safepoint.
  • Publish PC/safepoint-indexed root maps and expose the active native frame to the collector.
  • Trace and rewrite movable references in optimized frames, including values needed by deoptimization recovery.
  • Prove primitive-only maps contain no false roots and pointer-bearing plans contain no missing roots.
  • Stress relocation during optimized execution under normal, no-GIL, and sanitizer gates with deterministic post-move behavior.

Completion

057a2ef adds bounded live optimizer moving safepoints. AArch64 loops poll every 64 completed backedges, publish the exact loop-header recovery index after canonical copies, preserve ABI state, and enter the collector with no managed pointer held only in registers. Numeric guards apply only to values consumed by numeric operations; recovery-only objects occupy precisely marked scratch slots and are rewritten in place.

ae26011 runs the real relocation witness in both single-mutator and parallel_js no-GIL contexts. The combined optimizer gate passes 39/39 lowering tests and 68/68 runtime tests in normal and TSan modes. Primitive-only maps remain empty, malformed maps fail closed, and deterministic post-move bytecode recovery reads the relocated object.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions