mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-16 23:31:55 +00:00
LibJS: Make return control flow more static
With this only `ContinuePendingUnwind` needs to dynamically check if a scheduled return needs to go through a `finally` block, making the interpreter loop a bit nicer
This commit is contained in:
parent
73fdd31124
commit
c8e4499b08
Notes:
sideshowbarker
2024-07-17 03:30:41 +09:00
Author: https://github.com/Hendiadyoin1
Commit: c8e4499b08
Pull-request: https://github.com/SerenityOS/serenity/pull/24295
4 changed files with 54 additions and 38 deletions
|
@ -232,7 +232,7 @@ CodeGenerationErrorOr<NonnullGCPtr<Executable>> Generator::emit_function_body_by
|
|||
if (block->is_terminated())
|
||||
continue;
|
||||
generator.switch_to_basic_block(*block);
|
||||
generator.emit<Bytecode::Op::Yield>(nullptr, generator.add_constant(js_undefined()));
|
||||
generator.emit_return<Bytecode::Op::Yield>(generator.add_constant(js_undefined()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue