1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

LibJS: Fix codegen for nodes after try statements without 'finally'

Previously we were just dropping them on the ground :P
This commit is contained in:
Ali Mohammad Pur 2021-11-10 22:22:26 +03:30 committed by Linus Groh
parent 5a38f86f1b
commit b96118b5d1
4 changed files with 43 additions and 2 deletions

View file

@ -610,6 +610,22 @@ public:
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
};
class FinishUnwind final : public Instruction {
public:
FinishUnwind(Label next)
: Instruction(Type::FinishUnwind)
, m_next_target(move(next))
{
}
void execute_impl(Bytecode::Interpreter&) const;
String to_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&);
private:
Label m_next_target;
};
class ContinuePendingUnwind final : public Instruction {
public:
constexpr static bool IsTerminator = true;