Repository navigation
jit: #368 key the close-loop restart pc off the block-head twin; source inject_root_call_result colors from the trivia twin - #612
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 626189e131
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Some(marker) => unsafe { &(*caller_sym.jitcode).payload } | ||
| .result_color_for_jitcode_pc_pred(marker) | ||
| .filter(|&color| color != u16::MAX) |
There was a problem hiding this comment.
Use the trivia-aware result color for call fallthroughs
When an inlined CALL's fallthrough skips bytecode trivia such as Cache/Resume/NotTaken, this marker can resolve to the block-head coordinate while the actual resume PC is the trivia-skipped semantic_fallthrough_pc; using the raw predecessor twin here can pick the result color for the unskipped marker PC. The depth path above already uses depth_trivia_for_jitcode_pc for this marker, so the result slot can be nulled/restored at the wrong color and the paused caller snapshot will carry the wrong call result in those cases.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9855e02fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let Some(targets) = ca_targets.as_ref() { | ||
| for (_, target) in targets { | ||
| mark_call_assembler_target_active(target, token); |
There was a problem hiding this comment.
Mark the published self target, not the pending placeholder
When compiling a self-recursive CALL_ASSEMBLER loop through the new pending-self path, the entries in ca_targets still have compiled_ptr: 0 from the placeholder target. After publishing the real target above, this loop still passes that stale placeholder to mark_call_assembler_target_active, which no-ops because it cannot find a CompiledWasmLoop. In that self-recursive case the callee never records ca_active/ca_callers, so later wasm bridges are not protected by the CA-active trampoline decline and terminal-decline invalidation cannot reach existing callers.
Useful? React with 👍 / 👎.
The deduplicated WALK_END restart derivation still inverted the loop-header marker with python_pc_for_jitcode_pc. Resolve the marker with the new block_head_py_for_jitcode_pc exact-match reader instead of the full inversion. A resume marker is always a block-head offset (the marker twins store dense pc_map offsets and derive_resume_marker returns block-head table entries), so the inversion's exact tier is the whole resolution; a corpus census at the seam measured 430/430 queries with the exact-tier read equal to the full inversion, zero misses. A marker the table does not carry (skeleton / fixture) now restarts at the header itself, where the retired predecessor fallback could fabricate a coordinate. Assisted-by: Claude
Replace the eager backxlat_py_pc + result_color_at_pc_at derivation with the trivia-aware jitcode-keyed twin read, filtering the u16::MAX sentinel; a twin miss declines the compile. Keep the backxlat comparison only under PYRE_PCMAP_RESULT_AUDIT, mirroring compute_bridge_root_parent_frame's audit block. The sole caller sits behind the opt-in PYRE_P2_COMPILE path; a corpus census at this seam (plain + PYRE_P2_COMPILE=1) measured 2586/2586 queries with the twin read equal to the backxlat derivation. Assisted-by: Claude
Stacked on #602 (base:
rewrite-tracer). Two follow-up cutovers on the pc_map-removal frontier.Restart-pc twin keying — #602's S6 deduplicated the WALK_END restart derivation into a single point but kept the full
python_pc_for_jitcode_pcinversion. Resolve the loop-header marker with the newblock_head_py_for_jitcode_pcexact-match reader instead: a resume marker is always a block-head offset (the marker twins store dense pc_map offsets andderive_resume_markerreturns block-head table entries), so the inversion's exact tier is the whole resolution — a corpus census at the seam measured 430/430 exact-tier reads equal to the full inversion. A marker the table does not carry (skeleton / fixture) now restarts at the header itself, where the retired predecessor fallback could fabricate a coordinate.inject_root_call_resultcutover — the seam #589 deferred as not byte-certifiable by the default corpus. Certified here with the opt-in path exercised: a corpus census (plain +PYRE_P2_COMPILE=1) measured 2586/2586 twin reads equal to the backxlat derivation, and the audit-enforced runs below keep the assertions live at the seam. The primary read isresult_color_trivia_for_jitcode_pcwith theu16::MAXsentinel filter; a twin miss declines the compile; the backxlat comparison is retained underPYRE_PCMAP_RESULT_AUDIT, mirroringcompute_bridge_root_parent_frame.Verification (fresh LLBC per cycle):
PYRE_PCMAP_RESULT_AUDIT=1dynasm 208/208PYRE_PCMAP_RESULT_AUDIT=1 PYRE_P2_COMPILE=1dynasm 208/208cargo test -p pyre-jit-trace -p pyre-jit --features dynasmgreen🤖 Generated with Claude Code