1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

LibJS: Intercept returns through finally blocks in Bytecode

This is still not perfect, as we now actually crash in the
`try-finally-continue` tests, while we now succeed all
`try-catch-finally-*` tests.

Note that we do not yet go through the finally block when exiting the
unwind context through a break or continue.
This commit is contained in:
Hendiadyoin1 2022-11-13 20:56:53 +01:00 committed by Ali Mohammad Pur
parent c2108489a5
commit fcc3348bc8
5 changed files with 81 additions and 9 deletions

View file

@ -103,6 +103,7 @@ private:
Vector<Variant<NonnullOwnPtr<RegisterWindow>, RegisterWindow*>> m_register_windows;
Optional<BasicBlock const*> m_pending_jump;
Value m_return_value;
Handle<Value> m_saved_return_value;
Executable const* m_current_executable { nullptr };
Handle<Value> m_saved_exception;
OwnPtr<JS::Interpreter> m_ast_interpreter;