mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-31 22:56:04 +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
Notes:
sideshowbarker
2024-07-18 21:13:30 +09:00
Author: https://github.com/awesomekling
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