mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-24 11:21:34 +00:00
LibJS: Use premade shape when creating unmapped arguments objects
Takes Speedometer2.1/EmberJS-Debug-TodoMVC from ~4500ms to ~4000ms on my M3 MacBook Pro.
This commit is contained in:
parent
1f81f75add
commit
e8c351505e
Notes:
github-actions[bot]
2025-04-15 11:09:54 +00:00
Author: https://github.com/awesomekling
Commit: e8c351505e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4359
3 changed files with 36 additions and 6 deletions
|
@ -40,6 +40,13 @@ public:
|
|||
[[nodiscard]] u32 native_function_length_offset() const { return m_native_function_length_offset; }
|
||||
[[nodiscard]] u32 native_function_name_offset() const { return m_native_function_name_offset; }
|
||||
|
||||
[[nodiscard]] GC::Ref<Shape> unmapped_arguments_object_shape() { return *m_unmapped_arguments_object_shape; }
|
||||
[[nodiscard]] u32 unmapped_arguments_object_length_offset() const { return m_unmapped_arguments_object_length_offset; }
|
||||
[[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<Accessor> throw_type_error_accessor() { return *m_throw_type_error_accessor; }
|
||||
|
||||
// Not included in JS_ENUMERATE_NATIVE_OBJECTS due to missing distinct prototype
|
||||
GC::Ref<ProxyConstructor> proxy_constructor() { return *m_proxy_constructor; }
|
||||
|
||||
|
@ -157,6 +164,13 @@ private:
|
|||
u32 m_native_function_length_offset { 0 };
|
||||
u32 m_native_function_name_offset { 0 };
|
||||
|
||||
GC::Ptr<Shape> m_unmapped_arguments_object_shape;
|
||||
u32 m_unmapped_arguments_object_length_offset { 0 };
|
||||
u32 m_unmapped_arguments_object_well_known_symbol_iterator_offset { 0 };
|
||||
u32 m_unmapped_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
|
||||
GC::Ptr<ProxyConstructor> m_proxy_constructor;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue