LibJS: Always inline Lexer::current_code_point()

This gives a ~1% speedup when parsing the largest Discord JS file.
This commit is contained in:
Andreas Kling 2022-02-13 13:53:52 +01:00
parent 50a446a5d1
commit 92e0378dbd
Notes: sideshowbarker 2024-07-17 18:55:38 +09:00

View file

@ -358,7 +358,7 @@ ALWAYS_INLINE bool Lexer::is_unicode_character() const
return (m_current_char & 128) != 0;
}
u32 Lexer::current_code_point() const
ALWAYS_INLINE u32 Lexer::current_code_point() const
{
static constexpr const u32 REPLACEMENT_CHARACTER = 0xFFFD;
if (m_position == 0)