LibJS/Bytecode: Add Await and AsyncIteratorClose instructions

This commit is contained in:
Luke Wilde 2023-07-14 21:42:43 +01:00 committed by Linus Groh
commit d66eb4e3ba
Notes: sideshowbarker 2024-07-16 23:52:22 +09:00
4 changed files with 95 additions and 0 deletions

View file

@ -92,6 +92,12 @@ static void generate_cfg_for_block(BasicBlock const& current_block, PassPipeline
}
return;
}
case Await: {
auto const& continuation = static_cast<Op::Await const&>(instruction).continuation();
executable.exported_blocks->set(&continuation.block());
enter_label(continuation, current_block);
return;
}
case EnterUnwindContext: {
auto entry_point = static_cast<Op::EnterUnwindContext const&>(instruction).entry_point();
auto handler_target = static_cast<Op::EnterUnwindContext const&>(instruction).handler_target();