1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 08:35:09 +00:00

LibJS: Don't try to manage unwind contexts in the execution loop in BC

We are already doing this in a good manner via the generated code,
doing so in the execution loop as well will cause us to pop contexts
multiple times, which is not very good.
This commit is contained in:
Hendiadyoin1 2022-11-13 20:45:31 +01:00 committed by Ali Mohammad Pur
parent 133faa0acc
commit c2108489a5

View file

@ -91,10 +91,6 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e
m_current_block = unwind_context.handler;
unwind_context.handler = nullptr;
// If there's no finalizer, there's nowhere for the handler block to unwind to, so the unwind context is no longer needed.
if (!unwind_context.finalizer)
unwind_contexts().take_last();
accumulator() = exception_value;
m_saved_exception = {};
will_jump = true;
@ -102,7 +98,6 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e
}
if (unwind_context.finalizer) {
m_current_block = unwind_context.finalizer;
unwind_contexts().take_last();
will_jump = true;
break;
}