mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibJS: Let the bytecode interpreter set the VM's last value
This commit is contained in:
parent
023df8e596
commit
319a60043b
Notes:
sideshowbarker
2024-07-18 12:29:12 +09:00
Author: https://github.com/gunnarbeutner
Commit: 319a60043b
Pull-request: https://github.com/SerenityOS/serenity/pull/7973
3 changed files with 7 additions and 2 deletions
|
@ -41,6 +41,8 @@ Value Interpreter::run(Executable const& executable)
|
|||
|
||||
TemporaryChange restore_executable { m_current_executable, &executable };
|
||||
|
||||
vm().set_last_value(Badge<Interpreter> {}, {});
|
||||
|
||||
CallFrame global_call_frame;
|
||||
if (vm().call_stack().is_empty()) {
|
||||
global_call_frame.this_value = &global_object();
|
||||
|
@ -102,6 +104,8 @@ Value Interpreter::run(Executable const& executable)
|
|||
}
|
||||
}
|
||||
|
||||
vm().set_last_value(Badge<Interpreter> {}, accumulator());
|
||||
|
||||
m_register_windows.take_last();
|
||||
|
||||
auto return_value = m_return_value.value_or(js_undefined());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue