LibJS: Add fast_is<T>() for things that were hot in RTTI

This gives a ~4% speedup when parsing the largest Discord JS file.
This commit is contained in:
Andreas Kling 2022-02-13 13:07:38 +01:00
commit 515594c667
Notes: sideshowbarker 2024-07-17 18:55:47 +09:00
2 changed files with 69 additions and 0 deletions

View file

@ -134,4 +134,7 @@ private:
FunctionKind m_kind : 3 { FunctionKind::Normal };
};
template<>
inline bool Object::fast_is<ECMAScriptFunctionObject>() const { return is_ecmascript_function_object(); }
}