fix(codegen): preserve imported class expression property reads - #9758
fix(codegen): preserve imported class expression property reads#9758proggeramlug wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe code generator now preserves tagged values when reading properties from imported exported variables. New unit and integration tests cover class-expression prototypes, renamed re-exports, namespace access, and live rebinding. ChangesImported class-expression prototype reads
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Imported class-expression property reads now preserve class values and correctly expose prototypes across module boundaries, including renamed and live bindings. The covered behavior is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 5 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
|
Landed on |
Summary
An imported binding such as
export let Expr = class {}returnedundefinedforExpr.prototype, while the same read worked in its defining module. The imported-variable property path loaded the right value but masked away its class tag before dispatch.Use the ordinary property dispatcher after loading the binding through its live getter. This preserves class references, heap objects, and primitive values and retains existing origin-name handling for renamed re-exports.
Fixes #9366.
Validation
PERRY_CONCAT_SITE_CACHEregistration failure addressed by fix(cache): register concat switch and explain codegen inputs #9748.Additional probes confirmed separate pre-existing gaps in exported anonymous-class name inference and descriptor-value/prototype identity inside the defining module; this change addresses imported property dispatch.
No version bump.
Summary by CodeRabbit
Bug Fixes
.prototypereads return the correct value across modules.Tests