mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +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:
parent
46e61d208b
commit
e0abfcb27d
4 changed files with 27 additions and 29 deletions
|
@ -45,11 +45,8 @@ Exception::Exception(Value value)
|
|||
}
|
||||
|
||||
if (auto* interpreter = vm.interpreter_if_exists()) {
|
||||
auto& node_stack = interpreter->node_stack();
|
||||
for (ssize_t i = node_stack.size() - 1; i >= 0; --i) {
|
||||
auto* node = node_stack[i];
|
||||
VERIFY(node);
|
||||
m_source_ranges.append(node->source_range());
|
||||
for (auto* node_chain = interpreter->executing_ast_node_chain(); node_chain; node_chain = node_chain->previous) {
|
||||
m_source_ranges.append(node_chain->node.source_range());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue