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:
Hendiadyoin1
2024-05-12 11:03:26 +02:00
committed by Andreas Kling
parent 73fdd31124
commit c8e4499b08
4 changed files with 54 additions and 38 deletions

View File

@@ -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()));
}
}