mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibJS: Devirtualize Object::is_typed_array()
This commit is contained in:
parent
d154a758fa
commit
4cce181ece
Notes:
sideshowbarker
2024-07-17 06:51:10 +09:00
Author: https://github.com/awesomekling
Commit: 4cce181ece
Pull-request: https://github.com/SerenityOS/serenity/pull/22061
Reviewed-by: https://github.com/LucasChollet
2 changed files with 6 additions and 4 deletions
|
@ -184,7 +184,6 @@ public:
|
|||
|
||||
virtual bool is_dom_node() const { return false; }
|
||||
virtual bool is_function() const { return false; }
|
||||
virtual bool is_typed_array() const { return false; }
|
||||
virtual bool is_string_object() const { return false; }
|
||||
virtual bool is_global_object() const { return false; }
|
||||
virtual bool is_proxy_object() const { return false; }
|
||||
|
@ -225,6 +224,9 @@ public:
|
|||
|
||||
static FlatPtr has_magical_length_property_offset() { return OFFSET_OF(Object, m_has_magical_length_property); }
|
||||
|
||||
[[nodiscard]] bool is_typed_array() const { return m_is_typed_array; }
|
||||
void set_is_typed_array() { m_is_typed_array = true; }
|
||||
|
||||
protected:
|
||||
enum class GlobalObjectTag { Tag };
|
||||
enum class ConstructWithoutPrototypeTag { Tag };
|
||||
|
@ -244,6 +246,8 @@ protected:
|
|||
|
||||
bool m_has_magical_length_property { false };
|
||||
|
||||
bool m_is_typed_array { false };
|
||||
|
||||
private:
|
||||
void set_shape(Shape& shape) { m_shape = &shape; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue