mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 11:06:10 +00:00
LibJS/JIT: Add fast path for cached PutById
This commit is contained in:
parent
b1b2ca1485
commit
55e467c359
Notes:
sideshowbarker
2024-07-17 11:33:34 +09:00
Author: https://github.com/awesomekling
Commit: 55e467c359
Pull-request: https://github.com/SerenityOS/serenity/pull/21859
7 changed files with 189 additions and 12 deletions
|
@ -195,6 +195,8 @@ public:
|
|||
Value get_direct(size_t index) const { return m_storage[index]; }
|
||||
void put_direct(size_t index, Value value) { m_storage[index] = value; }
|
||||
|
||||
static FlatPtr storage_offset() { return OFFSET_OF(Object, m_storage); }
|
||||
|
||||
IndexedProperties const& indexed_properties() const { return m_indexed_properties; }
|
||||
IndexedProperties& indexed_properties() { return m_indexed_properties; }
|
||||
void set_indexed_property_elements(Vector<Value>&& values) { m_indexed_properties = IndexedProperties(move(values)); }
|
||||
|
@ -202,6 +204,8 @@ public:
|
|||
Shape& shape() { return *m_shape; }
|
||||
Shape const& shape() const { return *m_shape; }
|
||||
|
||||
static FlatPtr shape_offset() { return OFFSET_OF(Object, m_shape); }
|
||||
|
||||
void ensure_shape_is_unique();
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue