mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +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:
committed by
Andreas Kling
parent
73fdd31124
commit
c8e4499b08
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user