-
-
Notifications
You must be signed in to change notification settings - Fork 449
Open
Labels
E-MediumMedium difficulty problemMedium difficulty problemenhancementNew feature or requestNew feature or requestexecutionIssues or PRs related to code executionIssues or PRs related to code execution
Description
The current implementation of inline caching only works for properties that are in the object or in its direct prototype.
This is very limiting, as transitive properties (properties of prototype's prototype) are treated as a cache miss.
So code the code below always gives a cache miss:
class X {
getX() {
return 42;
}
}
class Y extends X {
getY() {
return 42;
}
}
let y = new Y();
y.getY() // cacheable
let y = new Y();
y.getX() // never cacheable with the current implementation :(
raskad
Metadata
Metadata
Assignees
Labels
E-MediumMedium difficulty problemMedium difficulty problemenhancementNew feature or requestNew feature or requestexecutionIssues or PRs related to code executionIssues or PRs related to code execution