1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:32:06 +00:00

LibJS: Don't track executing AST nodes in a Vector

Instead just link together the InterpreterNodeScopes in a linked list.
This was surprisingly hot on CanvasCycle.
This commit is contained in:
Andreas Kling 2021-03-21 17:38:42 +01:00
parent 46e61d208b
commit e0abfcb27d
4 changed files with 27 additions and 29 deletions

View file

@ -143,17 +143,6 @@ void Interpreter::exit_scope(const ScopeNode& scope_node)
vm().unwind(ScopeType::None);
}
void Interpreter::enter_node(const ASTNode& node)
{
vm().call_frame().current_node = &node;
push_ast_node(node);
}
void Interpreter::exit_node(const ASTNode&)
{
pop_ast_node();
}
void Interpreter::push_scope(ScopeFrame frame)
{
m_scope_stack.append(move(frame));