batch: land #8784, #8788, #8785, #8786 - #8803
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (74)
📝 WalkthroughWalkthroughThis PR adds imported object-literal method specialization, guarded short-spread calls, closure-captured packed-loop optimization, proxy-aware array iteration, and JavaScript ChangesImported object-literal specialization
Packed spread and loop optimization
Native async errors
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested labels: Suggested reviewers: ✨ 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 |
Batch landing of four reviewed PRs, validated once as a single merged tree.
Fixes applied while landing
cargo fmt --all(perf(codegen): direct-call stable methods with short packed spread tails #8788) — import ordering only.crates/perry-hir/src/lower/module_decl.rswas 2004 lines, 4 over the cap (perf(codegen): specialize imported object literal methods #8785). Extracted the self-containedis_direct_object_literalprobe tomodule_decl/object_literal.rsper the documented recipe; now 1990.StringHeaderpayload offsets are both insidemod tests(perry-ext-mysql2:1390,perry-ext-sharp:915), and both are borrow→immediate-compare with no intervening allocation, so neither spans a GC point. The two pre-existing production sites are unchanged. Baseline bumped by exactly those two.promise/native_async.rsgained an argument-positionget_raw_mut_ptrfeedingjs_error_new_with_message, which allocates. The handle was rooted, but a raw pointer already extracted into an argument slot is not rewritten by a copying collection (runtime: js_string_repeat holds a payload borrow across user valueOf — moving GC can relocate the subject mid-call #8427/runtime: js_regexp_exec holds the subject payload borrow across the lastIndex Get/ToLength user side effects #8428). Verified the callee is a self-rooting entry point (alloc_errorrootsmessageat error.rs:213 before its first allocation at :215, and re-reads through the handle at :218), so the argument is sound — converted to the idiomaticwith_mut_ptrscoped form rather than raising a module ceiling.Validation (merged tree)
perry-runtime2680,perry-codegen1238,perry-hir336,perry-stdlib120 — all 0 failedSummary by CodeRabbit
New Features
Bug Fixes
Errorobjects containingmessageandstack.codeanderrnometadata.Documentation
Errorbehavior.