boa
boa copied to clipboard
Transitive prototype inline caching
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 :(
I'll un-assign myself, currently not working on this if anyone is interested let me know 😄