mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +00:00
LibJS: Add fast_is<T> for StringObject and GlobalObject
Both of these are quite hot in profiles.
This commit is contained in:
parent
43f0c92bcd
commit
0a911178ce
3 changed files with 14 additions and 0 deletions
|
@ -46,9 +46,13 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
virtual bool is_string_object() const final { return true; }
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
PrimitiveString& m_string;
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool Object::fast_is<StringObject>() const { return is_string_object(); }
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue