LibJS/JIT: Clear exception before executing finalizer

language/statements/try/S12.14_A13_T2.js                        -> 
language/statements/try/S12.14_A15.js                           -> 
language/statements/try/S12.14_A7_T1.js                         -> 
language/statements/try/S12.14_A7_T2.js                         -> 
language/statements/try/S12.14_A7_T3.js                         -> 
language/statements/try/completion-values-fn-finally-abrupt.js  -> 
language/statements/try/completion-values-fn-finally-return.js  -> 
This commit is contained in:
Simon Wanner 2023-10-30 14:51:55 +01:00 committed by Andreas Kling
parent bd62c4763c
commit 0daebef727
Notes: sideshowbarker 2024-07-17 09:49:33 +09:00

View file

@ -398,6 +398,7 @@ void Compiler::check_exception()
m_assembler.jump(label_for(*handler));
no_exception.link(m_assembler);
} else if (auto const* finalizer = current_block().finalizer(); finalizer) {
store_vm_register(Bytecode::Register::exception(), GPR1);
m_assembler.jump_if(Assembler::Operand::Register(GPR0),
Assembler::Condition::NotEqualTo,
Assembler::Operand::Register(GPR1),