summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Lexer.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-02-13 13:53:52 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-13 14:44:36 +0100
commit92e0378dbd416633013377ace597e1c02ae6bef4 (patch)
tree1973011d11716bb40e3974dada76a87078b46185 /Userland/Libraries/LibJS/Lexer.cpp
parent50a446a5d1499fbcbeccffde7e5513b7e15fabb1 (diff)
downloadserenity-92e0378dbd416633013377ace597e1c02ae6bef4.zip
LibJS: Always inline Lexer::current_code_point()
This gives a ~1% speedup when parsing the largest Discord JS file.
Diffstat (limited to 'Userland/Libraries/LibJS/Lexer.cpp')
-rw-r--r--Userland/Libraries/LibJS/Lexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Lexer.cpp b/Userland/Libraries/LibJS/Lexer.cpp
index 43a3952a56..23a8e2de64 100644
--- a/Userland/Libraries/LibJS/Lexer.cpp
+++ b/Userland/Libraries/LibJS/Lexer.cpp
@@ -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)