docs(changelog): #7013 scalar-replacement root-slot hoist fragment - #7014
Merged
Conversation
PR #7013 was merged from a WIP commit before its changeset fragment was added. This supplies it: root cause, the measured 41ms -> ~3ms recovery, the entry-initialization obligation the hoist creates, and the 440-cell matrix result.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe changelog documents hoisting scalar-replacement root slot bindings to frame entry, required initialization for previously unwritten allocas, GC validation results, relocation handling, and codegen test coverage. ChangesScalar slot root binding
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
PR #7013 (
perf(gc): bind scalar-replacement root slots once per frame) wassquash-merged from a WIP commit before its changeset fragment was added. This
supplies the missing
changelog.d/7013-*.md.No code change — fragment only.
The fragment records what #7013 did and what backs it:
Root cause. fix(gc): scalar-replaced object/array locals are not precise roots (#6968) #7007 emitted
js_shadow_slot_bindat every store into ascalar-replaced field/element. A bind does four things, and for an
entry-hoisted alloca three of them are loop-invariant — the address never
changes, and every reader of a bound slot dereferences
slot_ptrs[idx]inpreference to the
stack[idx]mirror the bind refreshes, so the mirror isdead storage. Only the incremental-mark shading barrier is genuinely
per-store.
Measured recovery, quiet Mac mini (load 1.9), pinned Node 26.5.0, 10M
iterations, best-of-5, arms interleaved:
41 ms of rooting cost → ~3 ms, 93 % recovered. Binary size unchanged.
The soundness obligation the hoist creates. Binding at entry makes the
slot live from function entry, so the collector dereferences the alloca
before any store reaches it. The array-element and fused-uppercase-receiver
paths did not previously initialize their allocas; they now store
undefinedin
entry_allocaslike the object-literal path already did.Matrix.
--arms all --pressure 8: PASS=229 UNVER=190 XFAIL=1 FAIL=20over 440 cells (22 rows, post-test(gc): de-duplicate the matrix corpus entry registered twice by #6977 #7011) — main's published 460-cell baseline
minus exactly the row test(gc): de-duplicate the matrix corpus entry registered twice by #6977 #7011 de-duplicated (11 PASS + 9 UNVER). No cell
changed state. Both FAIL files are the expected gc: a relocating minor with PRECISE roots breaks 14 of 20 representation-corpus files (5 crashes, 9 mismatches) — the conservative stack scan is load-bearing for correctness #6981 pair.
Summary by CodeRabbit
Performance
Bug Fixes
Documentation
Tests