Skip to content

wasm: dead frame, guard cells and residual-call signatures on their upstream owners - #1960

Merged
youknowone merged 18 commits into
mainfrom
wasm-jit
Sep 26, 2026
Merged

youknowone merged 18 commits into
mainfrom
wasm-jit

Conversation

@youknowone

@youknowone youknowone commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Moves the wasm backend's remaining wasm-only structures onto the upstream owners.

  • Dead frame: get_latest_descr / grab_exc_value read jf_descr / jf_guard_exc on the jitframe the trace exited on; the copied dead-frame box and the withdrawn-dispatch window are removed.
  • Guard bridge cells live on the fail descr (adr_jump_offset, copy in WasmFailDescr.bridge_cell); bridge_slots, chained_bridge_slots, chained_trace_meta are removed. Each looptoken owns one CALL_ASSEMBLER dispatch entry at _ll_function_addr; CALL_ASSEMBLER_TARGETS, WASM_CA_DISPATCH, CA_CALLEE_REGS are removed.
  • Residual-call signatures come from the CallDescr and the function table; the address-keyed vouch tables and the math_*_residual_call_addrs hooks are removed.
  • CALL_ASSEMBLER goes through the rewriter's handle_call_assembler; write barriers are emitted only on the typed residual-call arm; jfi_frame_depth is read through JitFrameInfo::depth.
  • Guest exit runs the shared ObjSpace.finish sequence; stdio fds 0-2 are table entries written through the embedder hooks; os.write on a read-only fd answers EBADF.
  • Sequence-iterator index is Signed-width; int bounds apply only to fields narrower than a word.
  • Module-cache handles are reference-counted; a shared slot is not replaced in place. The web run_python keeps its runtime alive; only the one-shot wasm-host guest runs finish. wasmtime guest-memory growth is charged to the PYRE_MAX_MEMORY total.

Commits:

  • wasm: remove the dead gcmap, rewriter and slot-retraction helpers
  • bench: retire one wasm ratio allowance and refit the other
  • Make sequence iterator index Signed-width and bound only sub-word fields
  • quasiimmut: bound the recorder threads of the publication stress test
  • wasm: release a freed loop's resources through asmmemmgr_blocks
  • pyrex, wasm runner: cap process memory with PYRE_MAX_MEMORY
  • wasm: lower CALL_ASSEMBLER through the rewriter's handle_call_assembler
  • wasm: read jfi_frame_depth through JitFrameInfo::depth
  • wasm: run the shared ObjSpace.finish sequence at guest exit
  • pyre-interpreter: publish every interp2app wrapper address on wasm32
  • wasm: take residual-call signatures from the call descr and function table
  • wasm: write stdio descriptors through the embedder hooks
  • wasm: share trace_too_long_inline_multiframe jitstats
  • wasm: emit write barriers only on the typed residual-call arm
  • bench: share for_iter_direct_store_double jitstats across backends
  • wasm: use the live jitframe as the dead frame; drop the withdrawn-dispatch window
  • wasm: keep guard bridge cells and CALL_ASSEMBLER dispatch on their descrs
  • bench: record the wasm counter collision in load_method_self_binding; share exception_metadata_jitstress

Local verification: python3 pyre/check.py dynasm 567/567 and wasm 556/557 on the previous tip; the remaining wasm diff is load_method_self_binding on macOS only (a JitCounter bucket collision from upstream-identical hashes, address-layout dependent; Linux CI records the shared value). cargo test --all --no-default-features --features dynasm passed.

Not included: the per-site push_gcmap port of the wasm rooting (fails exception_traceback_frame_lineno at PYPY_GC_NURSERY=64K).

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 104 files, which is 4 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 03e4b4a1-e088-425b-a481-50a909076e57

📥 Commits

Reviewing files that changed from the base of the PR and between 665ead5 and 5ca7b9f.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (104)
  • majit/majit-backend-wasm-host/src/lib.rs
  • majit/majit-backend-wasm-host/tests/transport.rs
  • majit/majit-backend-wasm/src/codegen.rs
  • majit/majit-backend-wasm/src/failguard.rs
  • majit/majit-backend-wasm/src/glue.rs
  • majit/majit-backend-wasm/src/lib.rs
  • majit/majit-backend-wasm/src/release.rs
  • majit/majit-backend-wasm/tests/codegen_test.rs
  • majit/majit-backend/src/lib.rs
  • majit/majit-backend/src/resume_guard_descr.rs
  • majit/majit-gc/src/lib.rs
  • majit/majit-gc/src/process_ceiling.rs
  • majit/majit-gc/src/rewrite.rs
  • majit/majit-ir/src/descr.rs
  • majit/majit-metainterp/src/compile.rs
  • majit/majit-metainterp/src/jitcode/assembler.rs
  • majit/majit-metainterp/src/optimizeopt/intbounds.rs
  • majit/majit-metainterp/src/pyjitpl.rs
  • pyre/bench/synth/arith_int_bool.wasm.jitstats
  • pyre/bench/synth/attr_cache_invalidation.wasm.jitstats
  • pyre/bench/synth/binop_dunder_defaulted_param.wasm.jitstats
  • pyre/bench/synth/binop_dunder_leaf_inline.wasm.jitstats
  • pyre/bench/synth/bridge_branchy_callee.wasm.jitstats
  • pyre/bench/synth/class_reassign_hot.wasm.jitstats
  • pyre/bench/synth/condexpr_heap_const_merge.wasm.jitstats
  • pyre/bench/synth/dict_set.wasm.jitstats
  • pyre/bench/synth/exc_mixed_classes_bridge_flavor.wasm.jitstats
  • pyre/bench/synth/exception_bare_reraise_nested_outer.wasm.jitstats
  • pyre/bench/synth/exception_const_operand_resume.wasm.jitstats
  • pyre/bench/synth/exception_loop_warmup.wasm.jitstats
  • pyre/bench/synth/exception_metadata_jitstress.wasm.jitstats
  • pyre/bench/synth/exception_oserror_fields.py
  • pyre/bench/synth/exception_reraise_tb_depth_jitstress.wasm.jitstats
  • pyre/bench/synth/exception_reused_object_tb_not_doubled.wasm.jitstats
  • pyre/bench/synth/exception_vable_frame_virtual_local.wasm.jitstats
  • pyre/bench/synth/float_subclass_binop_dispatch.py
  • pyre/bench/synth/for_iter_conditional_store_bridge.wasm.jitstats
  • pyre/bench/synth/for_iter_direct_store_double.wasm.jitstats
  • pyre/bench/synth/gc_iterator_source_drop.wasm.jitstats
  • pyre/bench/synth/global_store_plain_dict_globals.wasm.jitstats
  • pyre/bench/synth/inheritance_dispatch.wasm.jitstats
  • pyre/bench/synth/inline_chain_depth_typeflip.wasm.jitstats
  • pyre/bench/synth/int_mul_ovf_bignum_promote.wasm.jitstats
  • pyre/bench/synth/kept_stack_boxed_in_handler.wasm.jitstats
  • pyre/bench/synth/kept_stack_depth_gt1.wasm.jitstats
  • pyre/bench/synth/kept_stack_depth_gt1_heap.wasm.jitstats
  • pyre/bench/synth/loops_comprehension.wasm.jitstats
  • pyre/bench/synth/nested_for_varying_trip.wasm.jitstats
  • pyre/bench/synth/p2_local_result_bridge.wasm.jitstats
  • pyre/bench/synth/pickle_terminal_raise_resume.py
  • pyre/bench/synth/raise_reg_unbound_jitstress.wasm.jitstats
  • pyre/bench/synth/short_circuit_boxed_int_cross_fn.wasm.jitstats
  • pyre/bench/synth/short_circuit_value_kept_stack.wasm.jitstats
  • pyre/bench/synth/short_circuit_value_local_kept.wasm.jitstats
  • pyre/bench/synth/sre_pattern_methods.wasm.jitstats
  • pyre/bench/synth/str_subscr_hot.wasm.jitstats
  • pyre/bench/synth/subscr_user_getitem_stack_index.wasm.jitstats
  • pyre/bench/synth/trace_too_long_effect_replay.wasm.jitstats
  • pyre/bench/synth/trace_too_long_inline_multiframe.wasm.jitstats
  • pyre/bench/synth/unbound_local_probe_loop.wasm.jitstats
  • pyre/check.py
  • pyre/gate-triage.md
  • pyre/pyre-interpreter/src/app_functional.rs
  • pyre/pyre-interpreter/src/baseobjspace.rs
  • pyre/pyre-interpreter/src/builtins.rs
  • pyre/pyre-interpreter/src/gateway.rs
  • pyre/pyre-interpreter/src/importing.rs
  • pyre/pyre-interpreter/src/jit_builtin_folds.rs
  • pyre/pyre-interpreter/src/jit_fnaddr.rs
  • pyre/pyre-interpreter/src/lib.rs
  • pyre/pyre-interpreter/src/module/posix/interp_posix_wasm.rs
  • pyre/pyre-interpreter/src/module/struct/mod.rs
  • pyre/pyre-interpreter/src/module/sys/vm.rs
  • pyre/pyre-interpreter/src/pyframe.rs
  • pyre/pyre-interpreter/src/runtime_ops.rs
  • pyre/pyre-interpreter/src/shutdown.rs
  • pyre/pyre-interpreter/src/type_methods.rs
  • pyre/pyre-interpreter/src/typedef.rs
  • pyre/pyre-jit-trace/build/prepass.rs
  • pyre/pyre-jit-trace/src/descr.rs
  • pyre/pyre-jit-trace/src/helpers.rs
  • pyre/pyre-jit-trace/src/jitcode_dispatch/fbw_state.rs
  • pyre/pyre-jit-trace/src/jitcode_dispatch/mod.rs
  • pyre/pyre-jit-trace/src/jitcode_dispatch/specialize.rs
  • pyre/pyre-jit-trace/src/lib.rs
  • pyre/pyre-jit/src/call_jit.rs
  • pyre/pyre-jit/src/eval.rs
  • pyre/pyre-macros/src/lib.rs
  • pyre/pyre-module/src/lib.rs
  • pyre/pyre-module/src/module/_cffi_backend/cdataobj.rs
  • pyre/pyre-module/src/module/math/interp_math.rs
  • pyre/pyre-object/src/iterobject.rs
  • pyre/pyre-object/src/quasiimmut.rs
  • pyre/pyre-wasm-runner/Cargo.toml
  • pyre/pyre-wasm-runner/src/main.rs
  • pyre/pyre-wasm-runner/src/memory_ceiling.rs
  • pyre/pyre-wasm-runner/src/wasmi_host.rs
  • pyre/pyre-wasm/src/lib.rs
  • pyre/pyrex/src/bin/pyre-cranelift.rs
  • pyre/pyrex/src/bin/pyre-dynasm.rs
  • pyre/pyrex/src/lib.rs
  • pyre/pyrex/src/main.rs
  • pyre/pyrex/src/memory_ceiling.rs
  • pyre/pyrex/tests/process_memory_ceiling.rs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🤖 Codex parity review

Static analysis of this diff vs the local RPython/PyPy sources (commit 5ca7b9f).
Updated: 2026-09-26T01:42:47.243Z

Files in the reviewed diff
Cargo.lock
majit/majit-backend-wasm-host/src/lib.rs
majit/majit-backend-wasm-host/tests/transport.rs
majit/majit-backend-wasm/src/codegen.rs
majit/majit-backend-wasm/src/failguard.rs
majit/majit-backend-wasm/src/glue.rs
majit/majit-backend-wasm/src/lib.rs
majit/majit-backend-wasm/src/release.rs
majit/majit-backend-wasm/tests/codegen_test.rs
majit/majit-backend/src/lib.rs
majit/majit-backend/src/resume_guard_descr.rs
majit/majit-gc/src/lib.rs
majit/majit-gc/src/process_ceiling.rs
majit/majit-gc/src/rewrite.rs
majit/majit-ir/src/descr.rs
majit/majit-metainterp/src/compile.rs
majit/majit-metainterp/src/jitcode/assembler.rs
majit/majit-metainterp/src/optimizeopt/intbounds.rs
majit/majit-metainterp/src/pyjitpl.rs
pyre/bench/synth/exception_oserror_fields.py
pyre/bench/synth/float_subclass_binop_dispatch.py
pyre/bench/synth/pickle_terminal_raise_resume.py
pyre/check.py
pyre/gate-triage.md
pyre/pyre-interpreter/src/app_functional.rs
pyre/pyre-interpreter/src/baseobjspace.rs
pyre/pyre-interpreter/src/builtins.rs
pyre/pyre-interpreter/src/gateway.rs
pyre/pyre-interpreter/src/importing.rs
pyre/pyre-interpreter/src/jit_builtin_folds.rs
pyre/pyre-interpreter/src/jit_fnaddr.rs
pyre/pyre-interpreter/src/lib.rs
pyre/pyre-interpreter/src/module/posix/interp_posix_wasm.rs
pyre/pyre-interpreter/src/module/struct/mod.rs
pyre/pyre-interpreter/src/module/sys/vm.rs
pyre/pyre-interpreter/src/pyframe.rs
pyre/pyre-interpreter/src/runtime_ops.rs
pyre/pyre-interpreter/src/shutdown.rs
pyre/pyre-interpreter/src/type_methods.rs
pyre/pyre-interpreter/src/typedef.rs
pyre/pyre-jit-trace/build/prepass.rs
pyre/pyre-jit-trace/src/descr.rs
pyre/pyre-jit-trace/src/helpers.rs
pyre/pyre-jit-trace/src/jitcode_dispatch/fbw_state.rs
pyre/pyre-jit-trace/src/jitcode_dispatch/mod.rs
pyre/pyre-jit-trace/src/jitcode_dispatch/specialize.rs
pyre/pyre-jit-trace/src/lib.rs
pyre/pyre-jit/src/call_jit.rs
pyre/pyre-jit/src/eval.rs
pyre/pyre-macros/src/lib.rs
pyre/pyre-module/src/lib.rs
pyre/pyre-module/src/module/_cffi_backend/cdataobj.rs
pyre/pyre-module/src/module/math/interp_math.rs
pyre/pyre-object/src/iterobject.rs
pyre/pyre-object/src/quasiimmut.rs
pyre/pyre-wasm-runner/Cargo.toml
pyre/pyre-wasm-runner/src/main.rs
pyre/pyre-wasm-runner/src/memory_ceiling.rs
pyre/pyre-wasm-runner/src/wasmi_host.rs
pyre/pyre-wasm/src/lib.rs
pyre/pyrex/src/bin/pyre-cranelift.rs
pyre/pyrex/src/bin/pyre-dynasm.rs
pyre/pyrex/src/lib.rs
pyre/pyrex/src/main.rs
pyre/pyrex/src/memory_ceiling.rs
pyre/pyrex/tests/process_memory_ceiling.rs

Codex did not produce a report (exit 1). Last log lines:

2026-09-26T01:42:29.761474Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:29.761767Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:29.874785Z ERROR rmcp::transport::worker: worker quit with fatal: Transport channel closed, when UnexpectedServerResponse("HTTP 401: {\n  \"error\": {\n    \"message\": \"Provided authentication token is expired. Please try signing in again.\",\n    \"type\": \"invalid_request_error\",\n    \"code\": \"token_expired\",\n    \"param\": null\n  },\n  \"status\": 401,\n  \"detail\": {\n    \"code\": \"token_expired\",\n    \"message\": \"Provided authentication token is expired. Please try signing in again.\"\n  }\n}")
2026-09-26T01:42:29.906828Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:29.906879Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:29.906910Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:29.947595Z ERROR rmcp::transport::worker: worker quit with fatal: Transport channel closed, when UnexpectedServerResponse("HTTP 401: {\n  \"error\": {\n    \"message\": \"Provided authentication token is expired. Please try signing in again.\",\n    \"type\": \"invalid_request_error\",\n    \"code\": \"token_expired\",\n    \"param\": null\n  },\n  \"status\": 401,\n  \"detail\": {\n    \"code\": \"token_expired\",\n    \"message\": \"Provided authentication token is expired. Please try signing in again.\"\n  }\n}")
2026-09-26T01:42:30.132141Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:30.264344Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:30.443562Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:30.526894Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:30.655929Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:30.655977Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:30.656011Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:31.106813Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:31.106877Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:31.106912Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: Reconnecting... 2/5
2026-09-26T01:42:31.836676Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:31.836737Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:31.836772Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: Reconnecting... 3/5
2026-09-26T01:42:32.851212Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:32.851272Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:32.851319Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: Reconnecting... 4/5
2026-09-26T01:42:34.778366Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:34.778417Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:34.778448Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: Reconnecting... 5/5
2026-09-26T01:42:37.997051Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:37.997110Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:37.997146Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
warning: Falling back from WebSockets to HTTPS transport. workspace routing discovery unauthorized (401)
2026-09-26T01:42:38.201639Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:38.201702Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:38.201748Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: Reconnecting... 1/5
2026-09-26T01:42:38.644952Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:38.645008Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:38.645040Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: Reconnecting... 2/5
2026-09-26T01:42:39.232617Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:39.232678Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:39.232712Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: Reconnecting... 3/5
2026-09-26T01:42:40.197892Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:40.197945Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:40.197980Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: Reconnecting... 4/5
2026-09-26T01:42:42.922828Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:42.922886Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:42.922916Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: Reconnecting... 5/5
2026-09-26T01:42:46.675965Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:46.676028Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
2026-09-26T01:42:46.676065Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: workspace routing discovery unauthorized (401)
2026-09-26T01:42:46.977719Z ERROR codex_login::auth::manager: Failed to refresh token: Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
ERROR: workspace routing discovery unauthorized (401)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb3c20f8fd

ℹ️ 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".

Comment thread pyre/pyre-wasm/src/lib.rs
Comment on lines +1195 to +1198
pyre_interpreter::shutdown::finalize_runtime(
canonical,
pyre_interpreter::call::getexecutioncontext(),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the web wasm runtime alive between runs

run_python_impl is also the #[wasm_bindgen] run_python entry point, and the bundled web UI invokes it again on every button click. Calling finalize_runtime here permanently marks the interpreter finalizing and detaches/clears its module state, but the next click reuses the same wasm instance rather than creating a fresh interpreter; subsequent browser runs therefore execute against torn-down sys/import/thread state. Finalize only the one-shot wasm-host path, or reset the runtime before allowing another web invocation.

Useful? React with 👍 / 👎.

Comment thread majit/majit-backend-wasm/src/glue.rs Outdated
Comment on lines +188 to +189
let cache = MODULE_CACHE.get_or_init(|| Mutex::new(indexmap::IndexMap::new()));
cache.lock().retain(|_, handle| *handle != func_id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reference-count cached wasm table handles before freeing

compile_module_cached intentionally returns one handle for byte-identical modules, while each compilation records that handle in its own LoopAsmResources and now frees it when its token is released. Removing the cache entry and calling the host free on the first release invalidates the same slot for any still-live cached owner; when that slot is reused, its next JIT dispatch can reach the wrong trace (or a null table entry). Track owners/refcounts per cached handle, or avoid sharing handles across independently released resources.

Useful? React with 👍 / 👎.

Comment on lines +47 to +49
let out = Command::new("/usr/bin/time")
.args(["-l", "-o"])
.arg(&rss_path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a portable RSS collector in the integration test

This invokes BSD /usr/bin/time -l, but Linux uses GNU time (with -v, not -l), and the review Linux image does not even provide /usr/bin/time; on Linux the command either cannot spawn or exits on the unsupported flag before pyre-dynasm runs. Since this dynasm-gated integration test is part of the required workspace cargo-test suite, the Ubuntu test job will fail instead of validating the memory ceiling. Use platform-specific collection or avoid an external time dependency.

AGENTS.md reference: AGENTS.md:L277-L283

Useful? React with 👍 / 👎.

Comment on lines +203 to +207
if self.ceiling != 0 && desired > self.ceiling {
emit_once();
return Ok(false);
}
Ok(true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Charge guest linear-memory growth against the process cap

The wasm guest limiter compares the guest memory's desired size only with ceiling; it never adds the growth delta to the host allocator's CHARGED total. Thus a runner with, for example, 200 MiB of host allocations can still grow guest memory to a 512 MiB PYRE_MAX_MEMORY limit, exceeding the advertised process ceiling by the host allocation (and the reverse is also possible). Reserve/release the guest-memory delta through the same accounting before accepting growth.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f56b244432

ℹ️ 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".

let mut cmd = match time_flag {
Some(flag) => {
let mut cmd = Command::new("/usr/bin/time");
cmd.args([flag, "-o"]).arg(&rss_path).arg(PYRE);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid GNU-only -o when invoking macOS time

Beyond the already-reported Linux flag issue, the macOS branch still passes GNU -o to BSD /usr/bin/time. macOS time(1) documents the synopsis as time [-l] [-p] utility ..., so this exits on the unrecognized option before pyre-dynasm runs; both dynasm-gated integration tests then fail their required stderr assertion on the macOS cargo-test job. Capture BSD time's stderr separately or use a macOS-specific collector. macOS time(1)

AGENTS.md reference: AGENTS.md:L277-L283

Useful? React with 👍 / 👎.

Comment on lines +590 to +595
let file = OpenFile {
data: Vec::new(),
pos: 0,
is_dir: false,
stdio: true,
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Model stdout and stderr as write-only descriptors

In wasm runs, this initializes fds 0, 1, and 2 identically as empty non-directory files. Consequently os.read(1, 1) and os.read(2, 1) fall through fd_take and incorrectly return b'', whereas stdout and stderr are write-only streams and must raise OSError with EBADF; only stdin should have the synthetic empty-read behavior. Store per-fd direction or reject reads for 1 and 2.

AGENTS.md reference: AGENTS.md:L219-L223

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2bc03a7693

ℹ️ 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".

Comment on lines +132 to +134
*owners -= 1;
drop(cache);
return compile_module(wasm_bytes);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Retain the replaced cache ownership until release

When two byte-identical loops share handle H and one later re-emits, this branch decrements H's cache count even though that loop's original LoopAsmResources still owns H and will call free(H) when it is released. If that token is freed first, its later free consumes the remaining owner's cache ref and clears H while the other loop can still dispatch through it (and a subsequent table reuse can misroute it). The new replace_module shared-handle branch is fresh evidence that the earlier cache-lifetime concern remains: keep the old ownership attached to the old resource until its drop, rather than decrementing it here.

Useful? React with 👍 / 👎.

@codspeed

codspeed Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 10 untouched benchmarks
⏩ 6 skipped benchmarks1


Comparing wasm-jit (a6ec0b5) with main (4f8c388)2

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (45e4d75) during the generation of this report, so 4f8c388 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

- `build_callee_gcmap` had no caller; `build_home_gcmap` builds the
  per-frame `jf_gcmap`. Its test now covers `build_home_gcmap`.
- `WasmBackend::gc_rewriter` forwarded to the free `gc_rewriter()`; the
  doc moves there and the test calls that function.
- `retarget_slots_to_module` and `retract_bridge_label_targets_for_slots`
  had no callers: re-emission leaves retired slots on the old module.
- `reemit_loop_retiring`'s retire list was unused; folded back into
  `reemit_loop`.
- `remember_and_drop_execution_frame` is reached only from its test;
  `run_compiled` runs the barrier and the pop around
  `WasmFrameData::boxed`.
- Drop the file-scope `InputArg` import, the doc comment on a
  `thread_local!`, an unnecessary `unsafe` around the wasm-bindgen
  `jit_func_sig`, and an unused test binding.

Assisted-by: Claude Opus 5
`float_subclass_binop_dispatch` drops its 5.6x allowance: darwin-arm64
reads 2.4x and 2.8x, ubuntu-24.04 2.0x and 2.1x.

`pickle_terminal_raise_resume` goes from 6.3x to 4.1x. Four darwin-arm64
readings give 3.2x, 3.3x, 3.3x and 3.5x; 4.1x is the highest plus
WASM_RATIO_FIT_HEADROOM. ubuntu-24.04 reads 2.4x and 2.7x.

Local gate on darwin-arm64: dynasm 563/563, wasm 553/553, with
`pickle_terminal_raise_resume` measured at 3.4x under the new allowance.

Assisted-by: Claude Opus 5
`W_SeqIterObject`, `W_ListIterObject`, `W_ListReverseIterObject` and
`W_TupleIterObject` store `index` as `isize` (`iterobject.py`
`W_AbstractSeqIterObject.index` is a `Signed`). Conversions to the `i64`
Python-int payload go through `seq_index_to_i64` / `seq_index_from_i64`; a
`__setstate__` cursor wider than a word raises OverflowError. The iterator
descr field sizes are `size_of::<isize>()`.

`intbounds.rs` narrows a GETFIELD / GETARRAYITEM result only when the field
or item is narrower than the machine word (`descr.py`
`FieldDescr.is_integer_bounded` / `ArrayDescr.is_integer_bounded`,
`< symbolic.WORD`), instead of narrower than 8 bytes.

On wasm32 the old shape recorded `IntAnd(index, 0xFFFFFFFF)` and a 4-byte
bound on the index read; the short preamble re-established it as
`IntGe(index, 1)`, which failed on every bridge entry with a fresh iterator.
Five wasm baselines now equal their dynasm baselines and are re-recorded:
attr_cache_invalidation (bridges 4->3, guard_failures 804->604),
gc_iterator_source_drop (10->8, 2018->1618), nested_for_varying_trip
(3->1, 617->396), sre_pattern_methods (guard_failures 1209->1018),
subscr_user_getitem_stack_index (2->1, 401->201).

Fold census unchanged: spec_folds rows 112, try_walker_specialize_ 96.

Assisted-by: Claude Opus 5
`publication_is_serialised_across_threads` ran its two recorder threads until
the mutators finished; under machine load the mutators were starved and one
instance's list grew to 75 GB. The recorders now stop after
`4 * ROUNDS` registrations or at `stop`, whichever comes first.

Assisted-by: Claude Opus 5.5
`CompiledLoopToken.free_loop_and_bridges` (`llmodel.py`
`AbstractLLCPU.free_loop_and_bridges`) now releases what a wasm loop and its
bridges hold. Each emission pushes a `LoopAsmResources` (new `release.rs`)
into the token's `asmmemmgr_blocks`; its `Drop` frees the host table slots
(`glue::free`, which also drops the `MODULE_CACHE` entry), removes the label
rows the token still owns (`LabelTarget.owner_token`), sets its fail indices
back to `Reserved`, and frees the home gcmaps and bridge cells it owns.
Before, these were leaked (`Box::leak`) or never released.

The host's `TraceState` keeps a `free_slots` list; `publish` reuses a freed
pair before growing the table. A token that another token jumps into stays
alive through `JitCellToken.record_jump_to`, so its slot is not freed under a
caller. Runtime gcmaps from `wasm_jit_union_gcmap` stay `Box::into_raw`, as
dynasm's `allocate_gcmap` does.

Assisted-by: Claude Opus 5
The pyre binaries (`pyre`, `pyre-dynasm`, `pyre-cranelift`) and
`pyre-wasm-runner` install `ProcessAllocator` as the global allocator. It
charges every allocation against a process ceiling: 8 GiB by default,
`PYRE_MAX_MEMORY` (bytes or K/M/G; 0 = unbounded) overrides it. An
allocation over the ceiling returns null after one stderr line
`pyre: process memory limit of N bytes exceeded (PYRE_MAX_MEMORY; 0 = unbounded)`:
fallible paths (`try_reserve`, bigint) raise MemoryError, infallible ones
abort in `handle_alloc_error`.

The counter lives in `majit_gc::process_ceiling`, so the GC's `std::alloc`
arenas are charged too, and `AsmLargeBlock::map` charges JIT code `mmap`s
(uncharged on unmap). The wasm runner keeps its own counter and refuses
guest linear-memory growth past the ceiling through its store limiter.
`uncharge` saturates at zero so a block allocated before the ceiling was
armed does not wrap the counter. `max_heap_size` (`incminimark.py`) is not
set from the ceiling, so collection thresholds below it are unchanged.

With `PYRE_MAX_MEMORY=512M`, a program appending 1 MiB bytearrays forever
and one appending 64 MiB bytes forever each stop with that line at a peak
RSS of 559 MB and 524 MB. `PYRE_MAX_MEMORY` is listed in
`pyre/gate-triage.md`.

Assisted-by: Claude Opus 5
The wasm backend now publishes `JitFrameDescrs` and
`call_assembler_callee_locs` to its GC rewriter, so every `CALL_ASSEMBLER*`
goes through `rewrite.py` `handle_call_assembler` → `gen_malloc_frame` →
`gen_malloc_nursery_varsize_frame` and reaches codegen as a one-argument
`CALL_ASSEMBLER(frame)`. A compiled loop's CLT carries `_ll_initial_locs`
(`8 + i*8`, the slots a wasm trace entry reads its inputs from) and its
`frame_info`; the lookup mirrors dynasm `lookup_call_assembler_callee_locs`.
The rewriter's `jitframe_info.is_none()` arm is deleted, as are the wasm-only
caller-side argument marshal and the host frame allocator
`wasm_jit_ca_alloc_frame`.

Kept, because wasm code is immutable and the GC cannot scan wasm locals:
dispatch through the `ca_dispatch_*` table cell, the shadow-stack push/pop
around the `call_indirect`, the callee's home gcmap, and the deopt path.

Nursery bytes are not zeroed (`incminimark.py` `arena_reset(..., 0)`), and
the callee's home gcmap marks its whole reserved Ref-home region, so the CA
arm clears that region before pushing the frame
(`emit_clear_reserved_homes`); without it `recursive_call_frame_relocation`
traced a stale pointer. x86 marks live slots per call (`assembler.py`
`push_gcmap`) and needs no such clear.

Interleaved wasm A/B against the previous commit (user-CPU, mean):
fib_recursive 0.968s -> 0.990s, loop_callee_shared_mutation 0.355s ->
0.365s, recursion_past_unroll_bound_from_loop 0.470s -> 0.475s.

Assisted-by: Claude Opus 5
jfi_frame_depth is an AtomicIsize; the CALL_ASSEMBLER callee-locs
lookup cast the field directly, which no longer compiles.

Assisted-by: Claude Opus 5.5
Move the native launcher's shutdown (threading._shutdown, atexit
_run_exitfuncs, sys.finalizing, signal-handler reset, stream flush,
module teardown) from pyrex into pyre_interpreter::shutdown::
finalize_runtime and call it from both pyrex and the wasm guest's
run_python_impl. The wasm guest previously ran no atexit callbacks.

Uncaught non-SystemExit errors in the guest now go through
sys.excepthook before finalization, like the native launcher.

Re-record nine wasm jitstats whose loops_compiled/loops_aborted (and
for inline_chain_depth_typeflip, guard_failures) now equal the native
baselines. guard_failures of exception_metadata_jitstress and
pickle_terminal_raise_resume stay at their wasm values (1073, 133;
native 1074, 132).

Assisted-by: Claude Opus 5.5
BUILTIN_WRAPPER_DESCRIPTORS is a linkme slice, which has no wasm32
arm, so the wasm guest's jit_trace_fnaddrs held only six hand-listed
__majit_wrap_* rows and every other builtin wrapper was an opaque call
there while the native JIT descended it.

Add WASM_BUILTIN_WRAPPER_DESCRIPTORS (constructor-registered, the same
shape as WASM_CLASS_DESCRIPTORS / WASM_TYPE_OBJECT_FNADDRS /
WASM_HELPER_FNADDRS) and for_each_builtin_wrapper_descriptor. The
emit both arms; every hand-written linkme static uses the macro. The
six hand-listed wasm32 rows in jit_fnaddr.rs are removed. The host
path set is unchanged (391 entries).

exception_metadata_jitstress, exception_vable_frame_virtual_local and
exception_reused_object_tb_not_doubled now record the native
guard_failures on wasm; their wasm baselines are re-recorded to it.

Assisted-by: Claude Opus 5.5
…table

A residual call is emitted as a direct `call_indirect` when the
CallDescr and the function table's declared type for the target agree
(`jit_func_sig`); otherwise it goes through `JIT_CALL_AREA` and
`jit_call`.

Removed the address-keyed side tables and their producers:
FAITHFUL_RESIDUAL_CALL_ADDRS, WORD_RESULT_RESIDUAL_CALL_ADDRS,
RESIDUAL_TARGET_SIG_CACHE, RESIDUAL_CALL_ABI / ResidualCallAbi, the
vouch APIs and the eval.rs vouch block, and the helper-address lists
that fed them.

ConstPtr fail args are resolved through the GcTable compile-key list
carried in ModuleBuildInputs / InlinedBridge instead of the thread-local
FAILARG_CONST_TABLE, which is removed.

Host unit tests keep TEST_RESIDUAL_TARGET_SIGS, since they have no
function table.

Fold census unchanged: 112 spec_folds! rows, 96 try_walker_specialize_ fns.

Assisted-by: Claude Opus 5.5
fds 0, 1 and 2 start open as stdio. Writes to 1 and 2 go through the
print and stderr hooks, then the host descriptor. Other open
descriptors stay read-only.

Assisted-by: Grok 4.7
The wasm run matches the shared baseline: fbw_blackhole_adopted
multi 3, single 13, loops_compiled 52, loops_aborted 16.

Assisted-by: Grok 4.7
Production modules always carry the residual call type family
(`body_reload_fn_ptr` is non-zero on wasm32, so `build_wasm_module` sets
`residual_max_arity`), and CondCallGcWb / CondCallGcWbArray already
require it through `direct_helper_i64_arity`. The `JIT_CALL_AREA`
write-barrier arms in `emit_write_barrier` and
`emit_jitframe_write_barrier`, which skipped the flag test and card
marking, were reached only from host unit tests; they are removed and
a module without the family reports `Unsupported`.

A COND_CALL whose signature the CallDescr does not establish is now
`Unsupported` instead of a host-trampoline call.

pickle_terminal_raise_resume: wasm observes guard_failures=132, the
native value, so the separate wasm baseline is removed.

Assisted-by: Claude Opus 5.5
wasm now records fbw_blackhole_adopted_single_frame=40, the native
value, so the separate wasm baseline is removed.

Assisted-by: Claude Opus 5.5
…patch window

The dead frame is the jitframe the trace exited on. A guard exit stores
its descr cell in `jf_descr` and, for an exception exit, the value in
`jf_guard_exc` (`_store_and_reset_exception`); `get_latest_descr` and
`grab_exc_value` read those fields (`llmodel.py`). The frame is rooted
once through an OwnerRootGuard. Removed: the copied `WasmFrameData`
box, `FAIL_DESCR_REGISTRY` / `global_fail_descr`, `jit_exc_take` /
`jit_exc_clear`. Descr cells and gcmaps are owned by the loop's
`LoopAsmResources`.

A propagate-exception exit (`compile_tmp_callback`'s
GUARD_NO_EXCEPTION) is staged on the live frame: the exception moves
from `jf_guard_exc` to fail-arg slot 0 and `jf_descr` / `jf_gcmap` are
retargeted at the exit-with-exception finish descr
(`_build_propagate_exception_path`).

The withdrawn-dispatch window is removed (`wasm_dispatch_withdrawn`,
the `wasm_inline_merge_exits` counter and its jitstats key). A merged
owner is installed at the bridge trip without a blackhole exit: the
running loop's back-edge reads a resume cell and tail-calls the
replaced module slot with the same jitframe; the replacement's own
back-edge is a plain `br` (`patch_jump_for_descr`).

Fold census unchanged: 105 spec_folds! rows, 89 try_walker_specialize_ fns.

Assisted-by: Claude Opus 5.5
…scrs

A guard's bridge cell address is carried on the fail descr
(`AbstractFailDescr.adr_jump_offset`, with a stable copy in
`WasmFailDescr.bridge_cell`). `compile_bridge` writes the cell and then clears
`adr_jump_offset`. A guard inside an inlined bridge gets its cell when the
owner is re-emitted, and the re-emitted module reads each guard's cell from
`ModuleBuildInputs.guard_cell_addrs`, collected from the descrs in emission
order.

Removed `bridge_slots`, `chained_bridge_slots`, `chained_trace_meta`, and the
decline for a bridge whose parent is not chained.

Each looptoken owns one `WasmCaDispatchEntry`, owned by `LoopAsmResources`,
whose address is `JitCellToken._ll_function_addr`. `redirect_call_assembler`
publishes after `update_frame_info`. Removed `CALL_ASSEMBLER_TARGETS`,
`WASM_CA_DISPATCH` and `CA_CALLEE_REGS`.

Removed the `bridge_decline_is_terminal` override.

Assisted-by: Claude Opus 5.5
`exception_metadata_jitstress` on wasm now records guard_failures=1214, the
native value; its wasm overlay is removed.

Assisted-by: Claude Opus 5.5

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ca7b9fbf0

ℹ️ 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".

Comment on lines +103 to +107
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
let charge = layout.size();
if !majit_gc::try_charge(charge) {
return refuse();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Route dynasm raw allocations through the memory cap

With PYRE_MAX_MEMORY set, this allocator only charges Rust GlobalAlloc calls, but the shipped dynasm path leaves NEW_VIA_GC false and x86::Assembler::new_alloc_fn_addr emits direct libc::malloc calls. Thus a hot allocation-heavy loop that reaches compiled NEW operations can grow the C heap without changing CHARGED, bypassing the advertised process ceiling (and the new integration test only exercises interpreter-side bytearray/bytes growth). Account for or replace those raw allocator entry points before claiming the cap applies to pyre-dynasm processes.

Useful? React with 👍 / 👎.

@youknowone
youknowone merged commit e73c823 into main Sep 26, 2026
14 of 16 checks passed
@youknowone
youknowone deleted the wasm-jit branch September 26, 2026 01:47
youknowone added a commit that referenced this pull request Sep 26, 2026
…frontend's wasm overlay (#1971)

#1960 landed with two wasm snapshot diffs on its ubuntu check.py job.

pickle_terminal_raise_resume on wasm reads loops_compiled=24,
loops_aborted=4, guard_failures=139 on ubuntu-24.04 and darwin-arm64,
which is the native baseline, so the wasm overlay is deleted.

gc_pypy_frontend's guard_failures counts GuardClass failures over the
gc.get_rpy_roots() list, which the fixture header documents as a
per-runner root-population figure under a band of 8. After #1960 the wasm
run reads 375 on ubuntu-24.04 and 377 on darwin-arm64 (331 before);
loops_compiled=2 and bridges_compiled=1 are unchanged. The overlay takes
the ubuntu reading.

Assisted-by: Claude Opus 5.5
youknowone added a commit that referenced this pull request Sep 26, 2026
…resume jitstats

Both wasm baselines were last recorded in #1932, before #1960 made the
sequence iterator index Signed-width. On wasm32 that removes the 4-byte index
bound whose short-preamble `IntGe(index, 1)` failed on every bridge entry with
a fresh iterator. main 17c8884 CI (ubuntu-24.04) fails both fixtures on
wasm; native counters are unchanged.

- pickle_terminal_raise_resume: wasm now reads loops_compiled 24,
  loops_aborted 4, guard_failures 139, bridges 0, equal to the shared native
  baseline, so the wasm file is removed.
- gc_pypy_frontend: wasm guard_failures 331 -> 373 on ubuntu-24.04 and 375
  on darwin-arm64; recorded as 374, inside the existing band of 8. The native
  baseline reads 402.

The fixture comment no longer attributes the root-count gap to eager
prebuilt_root_objects: only about 16k of the 22.5k roots are distinct objects.

Assisted-by: Claude
youknowone added a commit that referenced this pull request Sep 26, 2026
…aseline

wasm records the same counters as the shared `.jitstats` for these
fixtures (check.py --synthetic-only, wasm backend, on the previous head):

- trace_too_long_inline_multiframe: loops_compiled 51, loops_aborted 19,
  fbw_blackhole_adopted_single_frame 14, fbw_blackhole_adopted_multi_frame 4
  (overlay 50 / 16 / 13 / 3; upstream #1960 had already removed it)
- exception_reused_object_tb_not_doubled: guard_failures 29872 (overlay 29871)
- sre_pattern_methods: bridges_compiled 2, guard_failures 404 (overlay 3 / 604)

Assisted-by: Claude
Claude-Session: https://claude.ai/code/session_01Aei5CsUsBqUwyiYkkV4Bjm
youknowone added a commit that referenced this pull request Sep 27, 2026
…aseline

wasm records the same counters as the shared `.jitstats` for these
fixtures (check.py --synthetic-only, wasm backend, on the previous head):

- trace_too_long_inline_multiframe: loops_compiled 51, loops_aborted 19,
  fbw_blackhole_adopted_single_frame 14, fbw_blackhole_adopted_multi_frame 4
  (overlay 50 / 16 / 13 / 3; upstream #1960 had already removed it)
- exception_reused_object_tb_not_doubled: guard_failures 29872 (overlay 29871)
- sre_pattern_methods: bridges_compiled 2, guard_failures 404 (overlay 3 / 604)

Assisted-by: Claude
Claude-Session: https://claude.ai/code/session_01Aei5CsUsBqUwyiYkkV4Bjm
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