Do not deoptimize entire super class when adding a property#4489
Do not deoptimize entire super class when adding a property#4489lukastaegert merged 1 commit intomasterfrom
Conversation
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#deoptimize-superclassor load it into the REPL: |
Codecov Report
@@ Coverage Diff @@
## master #4489 +/- ##
=======================================
Coverage 98.72% 98.72%
=======================================
Files 206 206
Lines 7351 7351
Branches 2086 2086
=======================================
Hits 7257 7257
Misses 34 34
Partials 60 60
Continue to review full report at Codecov.
|
|
Confirmed to be working locally with Note the thread originally started with tree-shaking the flat I'll leave it up to you if you'd like to close this issue as resolved and we can let you know if anything new comes up? |
|
I think I will just merge this. I might also be able to improve handling of |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
We do not want to deoptimize the entire super class when adding a property, it is enough to deoptimize just properties of the given path (actually in a manner of speaking we may not need to deoptimize at all but deoptimization is a more general concept than reassignment and there may be some edge cases we need to cover).
Following a discussion in Twitter https://twitter.com/pschroen/status/1522269915864256512?s=20&t=8igcqT2KuKkLKgGP3hjvVA, see https://rollupjs.org/repl/?version=2.71.1&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmNsYXNzJTIwRm9vJTIwJTdCJTdEJTVDbiU1Q24lMkYlMkYlMjB0cnklMjByZW1vdmluZyUyMHRoaXMlMjBwcm90b3R5cGUlMjBwcm9wZXJ0eSU1Q25Gb28ucHJvdG90eXBlLmJhciUyMCUzRCUyMCU3QiU3RCUzQiU1Q24lNUNuY2xhc3MlMjBCYXIlMjBleHRlbmRzJTIwRm9vJTIwJTdCJTdEJTVDbiU1Q24lMkYlMkYlMjB0cnklMjByZW1vdmluZyUyMHRoaXMlMjBzdGF0aWMlMjBwcm9wZXJ0eSU1Q25CYXIuYmF6JTIwJTNEJTIwJTdCJTdEJTNCJTVDbiUyMiUyQyUyMmlzRW50cnklMjIlM0F0cnVlJTdEJTVEJTJDJTIyb3B0aW9ucyUyMiUzQSU3QiUyMmZvcm1hdCUyMiUzQSUyMmVzJTIyJTJDJTIybmFtZSUyMiUzQSUyMm15QnVuZGxlJTIyJTJDJTIyYW1kJTIyJTNBJTdCJTIyaWQlMjIlM0ElMjIlMjIlN0QlMkMlMjJnbG9iYWxzJTIyJTNBJTdCJTdEJTdEJTJDJTIyZXhhbXBsZSUyMiUzQW51bGwlN0Q=