mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-18 18:00:31 +00:00
Replace the OwnPtr<IndexedPropertyStorage> indirection with inline indexed element storage directly on Object. This eliminates virtual dispatch and reduces indirection for indexed property access. The new system uses three storage kinds tracked by IndexedStorageKind: - Packed: Dense array, no holes. Elements stored in a malloced Value* array with capacity header (same layout as named properties). - Holey: Dense array with possible holes marked by empty sentinel. Same physical layout as Packed. - Dictionary: Sparse storage using GenericIndexedPropertyStorage, type-punned into the m_indexed_elements pointer. Transitions: None->Packed->Holey->Dictionary (mostly monotonic). Dictionary mode triggers on non-default attributes or sparse arrays. Object keeps the same 48-byte size since m_indexed_elements (8 bytes) replaces IndexedProperties (8 bytes), and the storage kind + array size fit in existing padding alongside m_flags. The asm interpreter benefits from one fewer indirection: it now reads the element pointer and array size directly from Object fields instead of chasing through OwnPtr -> IndexedPropertyStorage -> Vector. Removes: IndexedProperties, SimpleIndexedPropertyStorage, IndexedPropertyStorage, IndexedPropertyIterator. Keeps: GenericIndexedPropertyStorage (for Dictionary mode). |
||
|---|---|---|
| .. | ||
| AsmInterpreter | ||
| ASTCodegen.cpp | ||
| BasicBlock.cpp | ||
| BasicBlock.h | ||
| BuiltinAbstractOperationsEnabled.h | ||
| Builtins.cpp | ||
| Builtins.h | ||
| Bytecode.def | ||
| ClassBlueprint.h | ||
| Executable.cpp | ||
| Executable.h | ||
| FormatOperand.h | ||
| Generator.cpp | ||
| Generator.h | ||
| IdentifierTable.cpp | ||
| IdentifierTable.h | ||
| Instruction.cpp | ||
| Instruction.h | ||
| Interpreter.cpp | ||
| Interpreter.h | ||
| Label.cpp | ||
| Label.h | ||
| Operand.h | ||
| PropertyAccess.h | ||
| PropertyKeyTable.cpp | ||
| PropertyKeyTable.h | ||
| PutKind.h | ||
| RegexTable.cpp | ||
| RegexTable.h | ||
| Register.h | ||
| ScopedOperand.cpp | ||
| ScopedOperand.h | ||
| StringTable.cpp | ||
| StringTable.h | ||