mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 19:56:30 +00:00
LibJS: Use premade shape when creating mapped arguments objects
Knocks out a 0.4% profile item on Speedometer 3.
This commit is contained in:
parent
ed5ad267c7
commit
e0b32b1863
Notes:
github-actions[bot]
2025-04-18 23:14:55 +00:00
Author: https://github.com/awesomekling
Commit: e0b32b1863
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4400
4 changed files with 25 additions and 5 deletions
|
@ -45,6 +45,11 @@ public:
|
|||
[[nodiscard]] u32 unmapped_arguments_object_well_known_symbol_iterator_offset() const { return m_unmapped_arguments_object_well_known_symbol_iterator_offset; }
|
||||
[[nodiscard]] u32 unmapped_arguments_object_callee_offset() const { return m_unmapped_arguments_object_callee_offset; }
|
||||
|
||||
[[nodiscard]] GC::Ref<Shape> mapped_arguments_object_shape() { return *m_mapped_arguments_object_shape; }
|
||||
[[nodiscard]] u32 mapped_arguments_object_length_offset() const { return m_mapped_arguments_object_length_offset; }
|
||||
[[nodiscard]] u32 mapped_arguments_object_well_known_symbol_iterator_offset() const { return m_mapped_arguments_object_well_known_symbol_iterator_offset; }
|
||||
[[nodiscard]] u32 mapped_arguments_object_callee_offset() const { return m_mapped_arguments_object_callee_offset; }
|
||||
|
||||
[[nodiscard]] GC::Ref<Accessor> throw_type_error_accessor() { return *m_throw_type_error_accessor; }
|
||||
|
||||
// Not included in JS_ENUMERATE_NATIVE_OBJECTS due to missing distinct prototype
|
||||
|
@ -169,6 +174,11 @@ private:
|
|||
u32 m_unmapped_arguments_object_well_known_symbol_iterator_offset { 0 };
|
||||
u32 m_unmapped_arguments_object_callee_offset { 0 };
|
||||
|
||||
GC::Ptr<Shape> m_mapped_arguments_object_shape;
|
||||
u32 m_mapped_arguments_object_length_offset { 0 };
|
||||
u32 m_mapped_arguments_object_well_known_symbol_iterator_offset { 0 };
|
||||
u32 m_mapped_arguments_object_callee_offset { 0 };
|
||||
|
||||
GC::Ptr<Accessor> m_throw_type_error_accessor;
|
||||
|
||||
// Not included in JS_ENUMERATE_NATIVE_OBJECTS due to missing distinct prototype
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue