fix(gc): refresh obj at the remaining six class-static mirror sites - #7383
Conversation
Completes #7381, which fixed two of eight and scoped itself there on the theory that refresh_roots_after_alloc!() -- which republishes obj, key, value and interned_key together -- could clobber an arm that rebinds value locally. That theory was wrong. None of the eight arms rebinds any of the four after its handle is taken, so republishing is a no-op except for the relocation it repairs. Measured rather than inspected: the full-coverage build scores 58 pass / 2 fail on the object/assign/class/field/shape gap set, byte-identical to pristine main, with both failures pre-existing. With all eight refreshed the fault leaves mirror_class_object_static_write entirely and surfaces the next catch in the chain at js_jsvalue_equals.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds root pointer refreshes before ChangesRoot Pointer Refresh for Class Static Mirroring
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
I wrote both fragments before opening their PRs and guessed the next number, so each was off by one: the mirror-remaining-sites work is #7383 (not 7382) and the size-arm rooting is #7385 (not 7384). 7384 is worse than cosmetic -- it is an open PR by another author, so the fragment claimed a number already in use and would have collided when that PR adds its own. Fragment names are PR-keyed precisely so in-flight PRs never collide; guessing the number defeats that. Open the PR first, then name the fragment. Co-authored-by: Ralph Küpper <ralph@skelpo.com>
…7401) * fix(lint): bring field_set_by_name.rs back under the 2000-line cap #7381 and #7383 took the file from 1990 to 2048 lines, so `lint` -- a REQUIRED check -- has been red on main, and every merge since has bypassed it. The overrun is comment volume, not code: eight refresh_roots_after_alloc! call sites each carried a multi-line rationale block. The rationale now sits once at the macro that implements it, which is where it belonged, and the call sites are bare. Worth recording how I got this wrong first: I checked the gate against origin/main, saw identical output, and called it pre-existing. That baseline already contained the two merges that caused it. The right comparison is a commit from before the change. * docs: name the fragment for its real PR (#7401) --------- Co-authored-by: Ralph Küpper <ralph@skelpo.com>
Completes #7381.
Correcting my own scoping call
#7381 fixed two of the eight
mirror_class_object_static_writesites, and scoped itself there on the theory thatrefresh_roots_after_alloc!()— which republishesobj,key,valueandinterned_keytogether — could clobber an arm that rebindsvaluelocally.That theory was wrong. None of the eight arms rebinds any of the four after its handle is taken, so republishing is a no-op except for the relocation it repairs.
What made me narrow it was two gap tests failing alongside the full patch. Those two turned out to fail identically on pristine
main— pre-existing, one already inknown_failures.json. I attributed them to my change before checking the baseline, and narrowed a correct patch on that basis.Measured, not inspected
mainByte-identical, same two pre-existing failures.
Result
With all eight refreshed,
test_gap_gc_assign_string_source_rooting's fault leavesmirror_class_object_static_writeentirely and surfaces the next catch in the chain, atjs_jsvalue_equals— still open. This test is a chain rather than a single defect, which is expected for one purpose-built to stress that path.Summary by CodeRabbit
Bug Fixes
Documentation