LibJS: Move AST node stack from VM to Interpreter

This commit is contained in:
Andreas Kling 2021-03-21 12:18:56 +01:00
commit 1603623772
Notes: sideshowbarker 2024-07-18 21:11:22 +09:00
7 changed files with 29 additions and 19 deletions

View file

@ -213,7 +213,8 @@ Value VM::construct(Function& function, Function& new_target, Optional<MarkedVal
{
CallFrame call_frame;
call_frame.callee = &function;
call_frame.current_node = current_node();
if (auto* interpreter = interpreter_if_exists())
call_frame.current_node = interpreter->current_node();
call_frame.is_strict_mode = function.is_strict_mode();
push_call_frame(call_frame, function.global_object());
@ -338,7 +339,8 @@ Value VM::call_internal(Function& function, Value this_value, Optional<MarkedVal
CallFrame call_frame;
call_frame.callee = &function;
call_frame.current_node = current_node();
if (auto* interpreter = interpreter_if_exists())
call_frame.current_node = interpreter->current_node();
call_frame.is_strict_mode = function.is_strict_mode();
call_frame.function_name = function.name();
call_frame.this_value = function.bound_this().value_or(this_value);