Skip to content

Merge train: #9912, #9917 - #9982

Merged
proggeramlug merged 6 commits into
mainfrom
train145
Sep 8, 2026
Merged

Merge train: #9912, #9917#9982
proggeramlug merged 6 commits into
mainfrom
train145

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Merge train: #9912, #9917.

#9917 against #9970

#9917 collapses the three RegExp.prototype.test proof slots into one CanonicalTestSite behind a single HotKey — one TLS address resolved per call instead of three. It was written before #9970 (landed in #9978) gated that surface for the no-default-features product build, so taking its side wholesale would have re-broken that build. Merged so both hold: the unified record, carrying #9970's cfg on the struct, its impl, the thread_local! and TEST_ACCESSOR_KEY_BIT.

Three consequences reconciled rather than left to surface later:

#9912 turns the segment-view lowering on by default

Its blocker is resolved: the runtime entry points it needs landed in #9870 (#9888). Measured on claude-code, the tier with #9893's levers is −14 % CPU and −30…−42 MB peak RSS with identical output. PERRY_SEGVIEW=0 remains as an opt-out, deliberately, because a switch that changes emitted code needs an off position that does not require rebuilding the compiler.

It also adds a test asserting the default really is ON — written because a typo making the predicate always-false would leave every direct-call test passing while the tier silently never fired in a real compile.

A note on how one fix here was found

The first validation run of this train died on ENOSPC. perry-codegen reported RC=101 with zero tests, and the -D warnings all-targets gate failed alongside it. It would have been easy to write both off as disk collateral. Re-running them individually on a healthy disk showed codegen was collateral (1948 passed, 0 failed) and the warnings gate was not: #9917's test nests an unsafe block inside one that already covers it, which only -D warnings on test targets rejects. An ENOSPC run mixes spurious failures with real ones, so each has to be re-run to tell them apart.

Validation

run_lint_gates: 3 of 80 FAILED; 0 ENOSPC, all three accounted for: public-baseline is pre-existing on main (verified on a pristine worktree, red since 2026-07-29), and the two API docs gates trip on this session's CARGO_TARGET_DIR override — with the binary where regen_api_docs.sh expects it, regeneration succeeds and the drift check is clean.

suite passed failed
perry-runtime 3313 0
perry-codegen 1948 0
perry-hir 630 0
perry-stdlib 132 0

Ralph Küpper added 6 commits September 8, 2026 01:22
The tier shipped default OFF because the runtime's view entry points did not
exist. #9870 landed them on main, and on claude-code the tier with #9893's
levers is -14 % CPU and -30…-42 MB peak RSS across 5/5 paired runs with
identical output.

`PERRY_SEGVIEW=0` remains as the opt-out. A switch that changes emitted code
needs an off position that does not require rebuilding the compiler, and a
program whose loops the tier declines pays nothing either way.

The test asserts the default through the same environment read the compiler
uses. Without it, a predicate that was accidentally always-false would leave
every other segview test passing — they call the rewrite directly — while the
tier silently never fired in a real compile.

(cherry picked from commit e495a1e)
…ating

#9917 collapses the three RegExp.prototype.test proof slots into one
CanonicalTestSite behind a single HotKey, but was written before #9970
gated that surface for the no-default-features product build. Merged so
both hold: the unified record, carrying #9970's cfg on the struct, its
impl, the thread_local and TEST_ACCESSOR_KEY_BIT.

Consequences reconciled:

- object_static_prototype_known_non_meta is #9917's, and its only caller
  is regex-engine gated, so it is dead in a product build. Same gate.
- The three _SLOT holder entries added for #9893 are stale: the statics
  no longer exist. Deleted, and a duplicate TEST_WALKS entry removed. The
  new REGEXP_PROTOTYPE_TEST_SITE needs no entry — the walk reaches it
  through scan_canonical_test_site_roots_mut, which
  scan_object_cache_roots_mut calls and reg_scanner! registers.
- segments_view's cursor-number store carried GC_STORE_AUDIT(NUMBER),
  which is not an accepted class, so the marker never satisfied the gate.
  POINTER_FREE is the class that states what the comment argues.
#9917's canonical-test-site test nests an `unsafe` block inside one that
already covers it. Only `-D warnings` on test targets rejects it, so a
plain `cargo check --workspace --all-targets` passes.

Worth noting how this surfaced: the first run of that gate died on ENOSPC
alongside perry-codegen, and it would have been easy to write both off as
disk collateral. Re-running it on a healthy disk showed codegen was
collateral and this was not.
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