1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-30 10:12:07 +00:00

LibJS: Remove FinishUnwind instruction

This is essentially a LeaveUnwind+Jump, so lets just do that, that will
make it easier to optimize it, or see unwind state transitions
This commit is contained in:
Hendiadyoin1 2022-11-13 18:38:15 +01:00 committed by Ali Mohammad Pur
parent fc332be2e5
commit 133faa0acc
5 changed files with 2 additions and 46 deletions

View file

@ -1987,7 +1987,8 @@ Bytecode::CodeGenerationErrorOr<void> TryStatement::generate_bytecode(Bytecode::
generator.emit<Bytecode::Op::Jump>(finalizer_target);
} else {
auto& block = generator.make_block();
generator.emit<Bytecode::Op::FinishUnwind>(Bytecode::Label { block });
generator.emit<Bytecode::Op::LeaveUnwindContext>();
generator.emit<Bytecode::Op::Jump>(Bytecode::Label { block });
next_block = &block;
}
}