mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 18:15:07 +00:00
LibJS: Make the AST reference-counted
This allows function objects to outlive the original parsed program without their ScopeNode disappearing.
This commit is contained in:
parent
d98fbd192e
commit
ddd69e3660
8 changed files with 138 additions and 130 deletions
|
@ -72,7 +72,7 @@ void Interpreter::enter_scope(const ScopeNode& scope_node, Vector<Argument> argu
|
|||
|
||||
void Interpreter::exit_scope(const ScopeNode& scope_node)
|
||||
{
|
||||
while (&m_scope_stack.last().scope_node != &scope_node)
|
||||
while (m_scope_stack.last().scope_node.ptr() != &scope_node)
|
||||
m_scope_stack.take_last();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue