mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
LibJS: Always inline two hot (and trivial) functions in JS::Lexer
This improves parsing time on a large chunk of JS by ~5%.
This commit is contained in:
parent
33f038ba7a
commit
76bafe5542
1 changed files with 2 additions and 2 deletions
|
@ -330,7 +330,7 @@ bool Lexer::is_eof() const
|
||||||
return m_eof;
|
return m_eof;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Lexer::is_line_terminator() const
|
ALWAYS_INLINE bool Lexer::is_line_terminator() const
|
||||||
{
|
{
|
||||||
if (m_current_char == '\n' || m_current_char == '\r')
|
if (m_current_char == '\n' || m_current_char == '\r')
|
||||||
return true;
|
return true;
|
||||||
|
@ -341,7 +341,7 @@ bool Lexer::is_line_terminator() const
|
||||||
return code_point == LINE_SEPARATOR || code_point == PARAGRAPH_SEPARATOR;
|
return code_point == LINE_SEPARATOR || code_point == PARAGRAPH_SEPARATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Lexer::is_unicode_character() const
|
ALWAYS_INLINE bool Lexer::is_unicode_character() const
|
||||||
{
|
{
|
||||||
return (m_current_char & 128) != 0;
|
return (m_current_char & 128) != 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue