Skip to content

jit(wasm): seed static marker frame green - #618

Merged
youknowone merged 1 commit into
mainfrom
agent/fix-wasm-marker-jit-entry
Jul 17, 2026
Merged

youknowone merged 1 commit into
mainfrom
agent/fix-wasm-marker-jit-entry

Conversation

@youknowone

Copy link
Copy Markdown
Collaborator

What

  • recover the first static jit_merge_point's Ref-green register color from the source-translated JitCode sidecar
  • seed that color with the root MIFrame's own concrete pycode_box
  • add a focused forward-selection/operand-decoding regression test

Why

#597 removed the direct merge-point hook and made the static marker path authoritative. The root JitCode walk still seeded only its formal red inputs (frame, ec). On wasm, the pre-marker vable load could leave the marker's pycode Ref green symbolic, so jit_merge_point aborted with JitMergePointGreenKeyUnresolved. Every hot key consequently interpreted forever (compiles=0, mc_entered=0) in the runtime codegen regression.

This follows the RPython _compile_and_run_once shape: the root MIFrame receives the concrete greens that selected its warm-state cell. Int greens remain in the JitCode constant region via copy_constants; only the per-frame Ref green is supplied through the Ref register bank. No shared portal-frame anchor or side table is introduced.

Impact

Restores wasm JIT entry and global-invalidation retracing after the static-marker cutover while preserving one pycode identity per frame. Native JIT benchmark behavior is unchanged.

Checks

  • cargo check --features dynasm
  • cargo test --features dynasm
  • cargo test -p pyre-jit-trace static_marker_entry_recovers_ref_green_register_color --features dynasm
  • cargo test -p majit-backend-wasm --test codegen_test -- --ignored
  • cargo test -p majit-backend-wasm --test codegen_test global_reassign_retraces_non_last_label_backedge_at_runtime -- --ignored --nocapture (also rerun after rebase on fresh LLBC)
  • python3 pyre/check.py --backend dynasm --no-synthetic (11/11)

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@youknowone, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a84bb799-b811-4f24-985b-f41a7b9010b3

📥 Commits

Reviewing files that changed from the base of the PR and between 01ab079 and cb92ed5.

📒 Files selected for processing (1)
  • pyre/pyre-jit-trace/src/trace.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fix-wasm-marker-jit-entry

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@youknowone
youknowone marked this pull request as ready for review July 17, 2026 08:50
@youknowone
youknowone merged commit c26ffe3 into main Jul 17, 2026
30 of 31 checks passed
@youknowone
youknowone deleted the agent/fix-wasm-marker-jit-entry branch July 17, 2026 08:51
@github-actions

Copy link
Copy Markdown

🤖 Codex parity review

Static analysis of this diff vs the local RPython/PyPy sources (commit cb92ed5).
Updated: 2026-07-17T08:53:08.153Z

Files in the reviewed diff
pyre/pyre-jit-trace/src/trace.rs

1. Regressions to PyPy parity introduced by this patch

None.

2. Other mismatches introduced by this patch

None.

3. Pre-existing mismatches (already present before this patch)

None.

4. Structural adaptations

  • pyre/pyre-jit-trace/src/trace.rs:645 ↔ rpython/jit/metainterp/pyjitpl.py:3290: Rust must decode the generated JitCode stream to locate the marker’s allocated Ref-green register, whereas RPython directly passes original_boxes to MIFrame.setup_call. This is a runtime-representation adaptation; the patch correctly seeds PyPy’s sole Ref green, pycode (pypy/module/pypyjit/interp_jit.py:66).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant