perf(codegen): re-enter guarded specialization clones - #8290
Conversation
|
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 (1)
📝 WalkthroughWalkthroughThe change extends guarded-path type inference for proven numeric expressions. Recursive fixtures and tests verify direct Tier-B clone re-entry for Number values and guarded fallback for BigInt-capable arithmetic. A changelog entry documents the behavior. ChangesTier-B guarded self-recursion
Estimated code review effort: 2 (Simple) | ~15 minutes 🚥 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 |
It landed carrying #8290's number; #8290 is a different open PR. Claude-Session: https://claude.ai/code/session_01AHvBYz7E6wWKv8kmvLLGpj
#8203 gives recursion-participating clones the preserve_none calling convention, which lands between `define internal`/`call` and the return type. The matchers here pinned a fixed prefix and stopped matching. Claude-Session: https://claude.ai/code/session_01AHvBYz7E6wWKv8kmvLLGpj
|
Merging. Fixes #8169 — the wrapper round-trip named as one of the two remaining routes in #8202. Two of your own tests failed against current The matchers pinned a fixed prefix ( Worth noting for the next IR-text test: a Verified after the fix: Letting constructively numeric derived arguments satisfy Tier-B routing while keeping BigInt-capable arithmetic on the public guarded fallback is the right split — and having both a positive and a negative IR regression for it is what makes that split checkable rather than asserted. |
Summary
f(n - 1)edges re-enter the$spec_bclone directly instead of re-running the public parameter guardFixes #8169.
Validation
cargo test -p perry-codegen spec_self_recursion_tests --lib(5 passed)cargo test -p perry-codegen --lib --no-fail-fast(1,067 passed; the two existing Windows temporary-object-name byte-identity tests failed:split_native_construction_lowers_precise_roots_before_rs4gc,split_native_construction_propagates_shadow_backend_to_workers)cargo fmt -p perry-codegen -- --checkpython scripts/check_test_registration.pygit diff --checkNo version bump. The required changelog fragment is included.
Summary by CodeRabbit
Performance
Bug Fixes