wasm/jit backend fixes, blackhole and frame-state repairs, and 3.14 interpreter surface parity - #890
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
74 commits, rebased onto
main(8c878513ef, #878).jit / blackhole / frame state
LOAD_GLOBALcell fold when the namespace operand is null.locals()/vars(); force the frame beforef_localsreads its fastlocals; defer the escape-flush undo restore to the walk-end epilogue; exempt theFOR_ITERloop-variable store from the in-flight body-effect guard.handle_failand blackhole resume; size the typed-array tids from the block they describe and barrier the blackhole ref stores; write-barrier the flat-pycall callee locals array; re-gray black stack roots before the major cycle freezes survivors.reached_loop_headeranswers a cancelled close withcancel_count += 1and, withmax_unroll_loopsat its default 0,SwitchToBlackhole(ABORT_BAD_LOOP), so upstream re-attempts at most once per tracing pass).pypyjit.set_param; wide binop immediates materialize through the scratch register;GUARD_NOT_INVALIDATED's branch routes through the long-branch pattern;setarrayitem_vable_rfor theBUILD_LISTpush.wasm backend
GcTable; root the deadframe exit-value copies; register thecollect_fullGC hook and the user-del action; give the launcher a stderr channel, an exit status and the script path; raiseMAX_STACK_SIZEoff wasm32 and clamp the length to the OS stack.interpreter surface (3.14)
method_descriptorto abuiltin_function_or_method;__rpow__'s third (modulus) argument; publish__objclass__/__name__as member descriptors;type's own docstring;type.__prepare__;object.__subclasshook__as a classmethod; exception__str__/__repr__descriptors, slot deletion andSystemExitinit.str/bytes/bytearray/memoryviewand forarray; name the class, not the instance layout, in iteration errors.ZeroDivisionErrormessage for every zero divisor; source length in "too many values to unpack" only for an exact tuple or list; MRO blocked-base and store-miss wording;add_noteargument-clinic wording.rpython/rlib/listsort.pyTimSort, sort through the list strategy and reinstall the items in one bulk init.locals()snapshot for optimized frames;dir()resolves its frame the waylocals()does;_abc_registerstructural-match marker;_imp.init_frozen;posixchown/lchown,pathconf_names, bytes-path directory names;_operatorregistration;bytes.translate(table, /, delete);str.islower/isupperskip uncased letters;TabErroron mixed tabs and spaces; math/descroperationnumeric-tower parity.verification (macOS)
pyre/check.py --backend dynasm,wasmon this tip, after re-extracting LLBC forpyre-object/pyre-interpreter/pyre-module/pyre-jit:synth/const_arg_call_resumetrips the perf gate. Itsexecis stable at 0.19s across runs and rebases while the ratio floats 37.8x / 38.8x / 39.0x / 44.8x — the movement is entirely in the pypy denominator, which the harness rounds to 0.005–0.01s. A/B of the base and branchpyre-dynasmbinaries earlier in this work measured the same user time, so this is the denominator-collapse class, not a behaviour change.synth/str_search_index_bounds— red before this rebase and resolved now thatmainadvanced; theMergePointvable-identity fix is in the new base.pyre/extra_tests/run.py --dynasm-only— 235/241. The six failures are pre-existing: three deliberate declines (builtin_list,builtin_tuple,builtin_slice),pickle_pypy_module(fails on CPython 3.14 too), and two open epics (stdlib_sysframe→function link,stdlib_sqlite_sqlite3port).cargo test -p pyre-interpreter --features dynasm --lib430 passed;cargo test -p pyre-jit-trace --lib300 passed;cargo fmt --all --checkclean.Known gap in the history: commit
728db88e17does not compile standalone —getindex_repeatis still private intypedef.rsat that point whiledescroperation.rsalready calls it throughbaseobjspace; the next commit moves and promotes it. The tip is fine; onlygit bisectis affected.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests