LibJS: Add a bunch of fast_is<T> helpers for commonly checked types

Based on what was hitting dynamic_cast<T> on Speedometer.
This commit is contained in:
Andreas Kling 2025-04-18 10:17:45 +02:00 committed by Andreas Kling
commit 84626c7db2
Notes: github-actions[bot] 2025-04-18 12:48:02 +00:00
4 changed files with 41 additions and 1 deletions

View file

@ -50,4 +50,7 @@ private:
virtual bool is_function() const override { return true; }
};
template<>
inline bool Object::fast_is<FunctionObject>() const { return is_function(); }
}