ladybird/Userland/Libraries/LibJS/Bytecode
Andreas Kling 8ff16c1b57 LibJS: Cache access to properties found in prototype chain
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.
2024-05-04 21:42:59 +02:00
..
ASTCodegen.cpp LibJS: Cleanup unwind state when transferring control out of a finalizer 2024-05-02 07:27:45 +02:00
BasicBlock.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
BasicBlock.h Revert "LibJS/Bytecode: Bring back the bytecode optimization pipeline" 2024-03-06 08:39:29 +01:00
Builtins.cpp LibJS: Introduce Builtins 2023-11-17 19:06:25 +01:00
Builtins.h LibJS/JIT: Add builtin for Math.exp() 2023-11-24 12:49:15 +01:00
CodeGenerationError.cpp
CodeGenerationError.h
CommonImplementations.h LibJS: Cache access to properties found in prototype chain 2024-05-04 21:42:59 +02:00
Executable.cpp LibJS+LibWeb: Use new Cell::Visitor helpers to avoid manual iteration 2024-04-16 07:40:01 +02:00
Executable.h LibJS: Cache access to properties found in prototype chain 2024-05-04 21:42:59 +02:00
Generator.cpp LibJS: Cleanup unwind state when transferring control out of a finalizer 2024-05-02 07:27:45 +02:00
Generator.h LibJS: Cleanup unwind state when transferring control out of a finalizer 2024-05-02 07:27:45 +02:00
IdentifierTable.cpp LibJS: Don't worry about deduplicating bytecode string tables 2023-10-04 20:10:12 +02:00
IdentifierTable.h
Instruction.cpp Revert "LibJS/Bytecode: Bring back the bytecode optimization pipeline" 2024-03-06 08:39:29 +01:00
Instruction.h LibJS: Cleanup unwind state when transferring control out of a finalizer 2024-05-02 07:27:45 +02:00
Interpreter.cpp LibJS: Fix build after merging CallFrame removal and finally fixes 2024-05-02 07:42:09 +02:00
Interpreter.h LibJS: Cleanup unwind state when transferring control out of a finalizer 2024-05-02 07:27:45 +02:00
Label.h
Op.h LibJS: Cleanup unwind state when transferring control out of a finalizer 2024-05-02 07:27:45 +02:00
Operand.h LibJS/Bytecode: Add Bytecode::Operand 2024-02-19 21:45:27 +01:00
RegexTable.cpp LibJS/Bytecode: Don't reparse regular expressions on instantiation 2023-07-13 13:30:49 +02:00
RegexTable.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Register.h LibJS: Stash thrown exception in a register before executing finalizer 2023-11-03 20:27:45 +01:00
StringTable.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
StringTable.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30