mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibJS: Let the bytecode interpreter set the VM's last value
This commit is contained in:
parent
023df8e596
commit
319a60043b
3 changed files with 7 additions and 2 deletions
|
@ -43,7 +43,7 @@ void Interpreter::run(GlobalObject& global_object, const Program& program)
|
|||
|
||||
VM::InterpreterExecutionScope scope(*this);
|
||||
|
||||
vm.set_last_value({}, {});
|
||||
vm.set_last_value(Badge<Interpreter> {}, {});
|
||||
|
||||
CallFrame global_call_frame;
|
||||
global_call_frame.current_node = &program;
|
||||
|
@ -56,7 +56,7 @@ void Interpreter::run(GlobalObject& global_object, const Program& program)
|
|||
vm.push_call_frame(global_call_frame, global_object);
|
||||
VERIFY(!vm.exception());
|
||||
auto value = program.execute(*this, global_object);
|
||||
vm.set_last_value({}, value.value_or(js_undefined()));
|
||||
vm.set_last_value(Badge<Interpreter> {}, value.value_or(js_undefined()));
|
||||
|
||||
vm.pop_call_frame();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue