mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:07:36 +00:00
LibJS: Move AST node stack from VM to Interpreter
This commit is contained in:
parent
b3b8c01ebf
commit
1603623772
7 changed files with 29 additions and 19 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue