1
Fork 0
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:
Andreas Kling 2021-03-19 11:28:44 +01:00
parent 43f0c92bcd
commit 0a911178ce
3 changed files with 14 additions and 0 deletions

View file

@ -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(); }
}