serenity/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
Lexer.cpp
Lexer.h
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
Preprocessor.h
SyntaxHighlighter.cpp
SyntaxHighlighter.h
Token.cpp
Token.h