perf: static method literals, captured closure reuse, argument shape facts - #8796
Merged
Conversation
…facts Lands #8793, #8792 and #8787. #8793 lowers static method literals directly; #8792 indexes captured closure reuse; #8787 propagates shape facts into argument positions. All three were showing pr-gate red before #8791 landed, because main itself was failing `cargo-test` on a Web Streams test. Re-gated against the fixed baseline, all three are clean. No version bump.
This was referenced Aug 25, 2026
|
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 (32)
📝 WalkthroughWalkthroughThe change adds exact-shape argument clones and guarded dispatch, reworks captured-closure caching, and directly lowers eligible static-key method object literals. Compiler, runtime, HIR, fixture, and regression tests cover these behaviors. ChangesExact-shape argument clones
Captured-closure cache hints
Static method object literals
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant CallLowering
participant ShapeFacts
participant ExactShapeGuard
participant PshapeArgsClone
participant GenericMethod
CallLowering->>ShapeFacts: resolve receiver and argument routes
ShapeFacts->>ExactShapeGuard: provide expected class and ShapeId
ExactShapeGuard->>PshapeArgsClone: all argument guards pass
ExactShapeGuard->>GenericMethod: a guard fails
PshapeArgsClone-->>CallLowering: specialized result
GenericMethod-->>CallLowering: fallback result
✨ 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 was referenced Aug 25, 2026
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.
Lands #8793, #8792 and #8787.
Why these were showing red before
All three had
pr-gatefailing, but not because of anything they did:mainitself was red oncargo-test(byob_readers_and_byte_length_strategy) until #8791 landed a few minutes ago. Re-gated against the fixed baseline, all three are clean.Validation (on the merged result)
lint-job checkers passperry-runtime --lib(RUST_TEST_THREADS=1): 2677 passed, 0 failed (+2)perry-codegen --lib: 1236 passed, 0 failed (+6)perry-hir --lib: 335 passed, 0 failed (+1)perry-codegen --tests(all integration suites): 0 failuresAll three carried their own
changelog.d/fragments. No version bump.Summary by CodeRabbit
Performance
Reliability
Testing