mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibJS: Let the bytecode interpreter set the VM's last value
This commit is contained in:
committed by
Andreas Kling
parent
023df8e596
commit
319a60043b
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user