New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle getters on functions and improve property deoptimization #4493
Conversation
Thank you for your contribution!
|
Codecov Report
@@ Coverage Diff @@
## master #4493 +/- ##
==========================================
+ Coverage 98.72% 98.74% +0.02%
==========================================
Files 206 207 +1
Lines 7351 7343 -8
Branches 2086 2082 -4
==========================================
- Hits 7257 7251 -6
+ Misses 34 33 -1
+ Partials 60 59 -1
Continue to review full report at Codecov.
|
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Closes #4492
Description
This PR supersedes #4492 as it reimplements the logic in a nicer way. At the core, this PR does two things:
Architecturally, the last two points are achieved by adding a new type of "unknown property key" in the logic, UnknownNonAccessorKey, that works similar to UnknownIntegerKey in that it is treated as unknown but we do not assume that reassignments to that key can create setters or getters and that we do not assume there will be setter side effects when reassigning that key.
For the function improvements, we now use
ObjectEntity
as a shared base for all object-like literals, i.e. objects, classes, functions (including arrow functions) and arrays. This will also make it easier to avoid code duplication for future features.