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

LibJS: Keep current exception in a call frame register

Instead of keeping it in a Bytecode::Interpreter member, move it into
a dedicated call frame register.
This commit is contained in:
Andreas Kling 2023-09-26 11:57:42 +02:00
parent ebb822def9
commit 3887b840a3
4 changed files with 20 additions and 20 deletions

View file

@ -77,7 +77,7 @@ public:
void do_return(Value return_value)
{
m_return_value = return_value;
m_saved_exception = {};
reg(Register::exception()) = {};
}
void enter_unwind_context(Optional<Label> handler_target, Optional<Label> finalizer_target);
@ -118,7 +118,6 @@ private:
BasicBlock const* m_scheduled_jump { nullptr };
Optional<Value> m_this_value;
Optional<Value> m_return_value;
Optional<Value> m_saved_exception;
Executable* m_current_executable { nullptr };
BasicBlock const* m_current_block { nullptr };
Optional<InstructionStreamIterator&> m_pc {};