1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:47:35 +00:00

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

View file

@ -358,7 +358,7 @@ ALWAYS_INLINE bool Lexer::is_unicode_character() const
return (m_current_char & 128) != 0; 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; static constexpr const u32 REPLACEMENT_CHARACTER = 0xFFFD;
if (m_position == 0) if (m_position == 0)