1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 11:47:35 +00:00

LibJS/Bytecode: Bring back the bytecode optimization pipeline

...minus the EliminateLoads pass, since it was not compatible with the
new bytecode format.
This commit is contained in:
Andreas Kling 2024-02-25 17:59:20 +01:00
parent 836d93f7e3
commit 5b29974bfa
15 changed files with 962 additions and 65 deletions

View file

@ -2510,7 +2510,7 @@ Bytecode::CodeGenerationErrorOr<Optional<Bytecode::Operand>> TryStatement::gener
auto& target_block = generator.make_block();
generator.switch_to_basic_block(saved_block);
generator.emit<Bytecode::Op::EnterUnwindContext>(Bytecode::Label { target_block });
generator.emit<Bytecode::Op::EnterUnwindContext>(Bytecode::Label { target_block }, handler_target, finalizer_target);
generator.start_boundary(Bytecode::Generator::BlockBoundaryType::Unwind);
if (m_finalizer)
generator.start_boundary(Bytecode::Generator::BlockBoundaryType::ReturnToFinally);