ladybird/Userland/Libraries/LibCpp
Itamar 42eb06f045 LibCpp: Don't store entire ASTNode vector in each parser state
We previously stored the entire ASTNode vector in each parser state,
and this vector was copied whenever a state was loaded or saved.

We don't actually need to store the whole nodes list in each state
because a new state can only add new nodes to this list, and won't
mutate existing nodes.

It would suffice to only hold a vector of the nodes that were created
while parsing in the current state to keep a reference to them.

This reduces the time it takes on my machine for the c++ language
server to handle a file that #includes <LibGUI/Widget.h> from ~4sec to
~0.7sec.
2021-07-13 23:20:09 +02:00
..
Tests LibCpp: Fix positional information of Pointer types 2021-07-04 17:50:33 +02:00
AST.cpp LibCpp: Make the fields of AST node types private 2021-07-10 21:58:28 +02:00
AST.h LibCpp: Use fast_is<T> and verify_cast<T> to replace C-style casts 2021-07-10 21:58:28 +02:00
CMakeLists.txt LibCpp: Move Cpp::Token to a separate file 2021-03-13 10:17:02 +01:00
Lexer.cpp LibCpp: Remove InlineLinkedList from the list of known types 2021-06-16 10:40:01 +02:00
Lexer.h LibCpp: Use east const style in Lexer and SyntaxHighlighter 2021-06-05 00:32:28 +04:30
Parser.cpp LibCpp: Don't store entire ASTNode vector in each parser state 2021-07-13 23:20:09 +02:00
Parser.h LibCpp: Don't store entire ASTNode vector in each parser state 2021-07-13 23:20:09 +02:00
Preprocessor.cpp LibCpp: Add option in Preprocessor to keep #include's in processed text 2021-05-22 15:52:11 +02:00
Preprocessor.h HackStudio: Make TODO entries clickable 2021-06-23 19:00:11 +01:00
SyntaxHighlighter.cpp LibWeb+LibSyntax: Implement nested syntax highlighters 2021-06-07 14:45:49 +04:30
SyntaxHighlighter.h LibWeb+LibSyntax: Implement nested syntax highlighters 2021-06-07 14:45:49 +04:30
Token.cpp LibCpp: Modify Token::to_string() to include more information 2021-05-22 15:52:11 +02:00
Token.h LibCpp: Modify Token::to_string() to include more information 2021-05-22 15:52:11 +02:00