mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-22 18:22:07 +00:00
We already had fast access to own properties via shape-based IC. This patch extends the mechanism to properties on the prototype chain, using the "validity cell" technique from V8. - Prototype objects now have unique shape - Each prototype has an associated PrototypeChainValidity - When a prototype shape is mutated, every prototype shape "below" it in any prototype chain is invalidated. - Invalidation happens by marking the validity object as invalid, and then replacing it with a new validity object. - Property caches keep a pointer to the last seen valid validity. If there is no validity, or the validity is invalid, the cache misses and gets repopulated. This is very helpful when using JavaScript to access DOM objects, as we frequently have to traverse 4+ prototype objects before finding the property we're interested in on e.g EventTarget or Node. |
||
---|---|---|
.. | ||
ASTCodegen.cpp | ||
BasicBlock.cpp | ||
BasicBlock.h | ||
Builtins.cpp | ||
Builtins.h | ||
CodeGenerationError.cpp | ||
CodeGenerationError.h | ||
CommonImplementations.h | ||
Executable.cpp | ||
Executable.h | ||
Generator.cpp | ||
Generator.h | ||
IdentifierTable.cpp | ||
IdentifierTable.h | ||
Instruction.cpp | ||
Instruction.h | ||
Interpreter.cpp | ||
Interpreter.h | ||
Label.h | ||
Op.h | ||
Operand.h | ||
RegexTable.cpp | ||
RegexTable.h | ||
Register.h | ||
StringTable.cpp | ||
StringTable.h |