fix(runtime): materialize ordinary parent prototypes - #8768
Conversation
|
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 (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe class registry now resolves runtime-valued function parent prototypes through the observable prototype-read path. This materializes unread lazy prototypes and preserves explicit, deleted, and generator prototype behavior. A changelog entry documents the fix. ChangesRuntime parent prototype resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized runtime change materializes ordinary parent prototypes through the canonical prototype-read path and includes targeted regression and parity validation; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
…es, reactor HTTP scheduling (#8778) Lands #8765, #8767, #8768 and #8769. #8765 stops mysql2 prepared statements and pool transactions leaking state across requests: each SQL string and parameter vector lives in one owned request, a parameterless `query()` uses the text protocol, prepared statements are request-scoped, and registry-backed mutable connection references become serialized owned handles with safe close/release around in-flight work. #8767 admits arrays reached through one validated forwarding edge into version-stable indexed loops, canonicalizing the compiler-private local to the live array after the full header/fingerprint check. Per-iteration fingerprint guards are retained, so callback-driven growth or a GC still side-exits before the next effect, and invalid targets or longer chains fail closed to the generic loop. #8768 materializes ordinary parent prototypes. #8769 schedules HTTP and HTTPS accept loops through the reactor-owned async bridge, using the same path for Unix round-robin fd injection. Changelog fragments added for #8765, #8767 and #8769; none carried one or a skip-changelog label. No version bump. Co-authored-by: Ralph Küpper <ralph@skelpo.com>
|
Landed on Validated on the merged result: all 30 lint checkers, runtime 2674/0 at |
Release-blocker follow-up to #8766.
The full gap shard exposed a second lazy-prototype case on current
main: an ordinary runtime-valued function superclass (class Child extends WithDefault) threwClass extends value does not have valid prototype propertyunless some unrelated code had readWithDefault.prototypefirst.#8766 correctly added lazy materialization for bound native constructor exports, but implemented it as a raw dynamic-slot probe plus an
ordinary_function_prototype_value_for_readfallback. This follow-up routes the class-definitionGet(superclass, "prototype")through the existing canonicaljs_function_prototype_value_for_readhelper instead. That one path preserves explicit/deleted/generator prototype semantics while lazily materializing both ordinary-function and bound-native-constructor prototypes.The existing failing regression is
test_gap_class_extends_runtime_value_super; no snapshot or expectation is weakened.Validation on the rebased result:
cargo fmt --all -- --checkgit diff --checkcargo test -p perry-runtime class_parent_prototype_tests: 2 passed, 0 failedrelease-profile compiler/runtime rebuilt from this branch
exact Node/Perry output parity for
test_gap_class_extends_runtime_value_super:No version bump and no tag.
Summary by CodeRabbit
prototype, including when it has not been accessed previously.