Skip to content

Commit 9ca25e5

Browse files
committed
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.
1 parent 81671c3 commit 9ca25e5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Libraries/LibJS/Lexer.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,19 @@ class JS_API Lexer {
6464
Token m_current_token;
6565
char16_t m_current_code_unit { 0 };
6666
bool m_eof { false };
67+
bool m_regex_is_in_character_class { false };
68+
bool m_allow_html_comments { true };
6769

6870
String m_filename;
6971
size_t m_line_number { 1 };
7072
size_t m_line_column { 0 };
7173

72-
bool m_regex_is_in_character_class { false };
73-
7474
struct TemplateState {
7575
bool in_expr;
7676
u8 open_bracket_count;
7777
};
7878
Vector<TemplateState> m_template_states;
7979

80-
bool m_allow_html_comments { true };
81-
8280
static HashMap<Utf16FlyString, TokenType> s_keywords;
8381
};
8482

0 commit comments

Comments
 (0)