From 9ca25e55d7a901dfc9fd0396360da9fd31cc0816 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 8 Nov 2025 20:45:56 +0100 Subject: [PATCH] LibJS: Rearrange Lexer members to shrink it by 16 bytes This is useful since the parser's state saving mechanism works by copying the lexer object. --- Libraries/LibJS/Lexer.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Libraries/LibJS/Lexer.h b/Libraries/LibJS/Lexer.h index 958f09f2b1a..4973733d155 100644 --- a/Libraries/LibJS/Lexer.h +++ b/Libraries/LibJS/Lexer.h @@ -64,21 +64,19 @@ private: Token m_current_token; char16_t m_current_code_unit { 0 }; bool m_eof { false }; + bool m_regex_is_in_character_class { false }; + bool m_allow_html_comments { true }; String m_filename; size_t m_line_number { 1 }; size_t m_line_column { 0 }; - bool m_regex_is_in_character_class { false }; - struct TemplateState { bool in_expr; u8 open_bracket_count; }; Vector m_template_states; - bool m_allow_html_comments { true }; - static HashMap s_keywords; };