fix: keep main green after the #9300/#9315/#9316 batch - #9320
Merged
Conversation
added 4 commits
August 31, 2026 21:22
…ntory CLASS_SYMBOL_MEMBER_ORDERS is keyed by SymbolHeader::id (stable, not an address) with a u32 order value; CLASS_DYNAMIC_PROP_ORDER holds owned Rust strings. Neither stores a JSValue, so neither is a GC root.
…ecl.rs class_decl.rs was at 1989 lines; #9315's additions take it over the 2000-line gate. The non-computed member registration and Symbol.iterator wrapper helpers move to a sibling module unchanged.
`-D warnings` in CI treats unused_parens as an error.
|
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 (5)
📝 WalkthroughWalkthroughThe PR extracts class-member registration helpers into a dedicated module, adds symbol iterator wrapper synthesis there, records GC root-holder classifications, removes redundant parentheses, and documents these changes in the internal changelog. ChangesClass lowering and runtime follow-up
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant LoweringContext
participant synthesize_symbol_iterator_wrapper
participant pending_functions
participant iterator_func_for_class
participant IteratorWrapper
participant LiftedIterator
LoweringContext->>synthesize_symbol_iterator_wrapper: provide class name and generator function
synthesize_symbol_iterator_wrapper->>IteratorWrapper: prepend this parameter
synthesize_symbol_iterator_wrapper->>LiftedIterator: replace this references and lift generator body
synthesize_symbol_iterator_wrapper->>pending_functions: register lifted generator
synthesize_symbol_iterator_wrapper->>iterator_func_for_class: register class mapping
synthesize_symbol_iterator_wrapper-->>LoweringContext: return synthetic @@iterator wrapper
IteratorWrapper->>LiftedIterator: call with this
✨ 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 |
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.
Follow-up to #9300 / #9315 / #9316, all validated together as one build before that batch merged.
class_decl.rsback under the file cap. It sat at 1989 lines onmainand #9315's additions took it to 2013. The non-computed member registration andSymbol.iteratorwrapper helpers move to a sibling module under the existingclass_decl/directory convention, unchanged apart frompub(super)visibility.Two order side-tables classified in the root-holder inventory.
gc_runtime_root_holders.pyfails onmainright now with two unclassified holders. Both are genuinely not GC roots, and the reasoning is worth recording because the first one looks like it should be:CLASS_SYMBOL_MEMBER_ORDERS: HashMap<(u32, u64, bool), u32>— its declaration comment says symbol registries are keyed by heap addresses, which would make it a table needing a re-key on evacuation. It isn't:record_class_symbol_member_orderreadsSymbolHeader::idonce at registration and keys on that, and the id is stable across a move. The member values live inCLASS_SYMBOL_METHODS/CLASS_SYMBOL_ACCESSORS, whichscan_class_symbol_member_keys_mutvisits andrewrite_class_symbol_method_key_if_forwardedre-keys.CLASS_DYNAMIC_PROP_ORDER: HashMap<u32, Vec<String>>— owned Rust strings recording first-insertion order for[[OwnPropertyKeys]]; thef64values live inCLASS_DYNAMIC_PROPS, already a scanned root.One
unused_parensin the numeric-range header read from #9316, which-D warningsmakes a build failure.Validation:
perry-runtime+perry-codegen+perry-hir(80 suites) green underRUST_TEST_THREADS=1;strided_tagged_fillpassing; andtest_gap_9226_class_prototype_own_keys.tsbyte-identical against the pinned Node 26.5.1 oracle. Release build clean with no warnings; file-size, raw-handle, thread-local, root-holder, GC-knob, store-site and fmt gates all pass.Summary by CodeRabbit
Refactor
Chores