mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibJS: Handle FinishUnwind in GenerateCFG
This commit is contained in:
parent
6998b72d22
commit
a00c421d61
2 changed files with 7 additions and 0 deletions
|
@ -795,6 +795,8 @@ public:
|
||||||
String to_string_impl(Bytecode::Executable const&) const;
|
String to_string_impl(Bytecode::Executable const&) const;
|
||||||
void replace_references_impl(BasicBlock const&, BasicBlock const&);
|
void replace_references_impl(BasicBlock const&, BasicBlock const&);
|
||||||
|
|
||||||
|
Label next_target() const { return m_next_target; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Label m_next_target;
|
Label m_next_target;
|
||||||
};
|
};
|
||||||
|
|
|
@ -90,6 +90,11 @@ void GenerateCFG::perform(PassPipelineExecutable& executable)
|
||||||
enter_label(&resume_target, current_block);
|
enter_label(&resume_target, current_block);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
case FinishUnwind: {
|
||||||
|
auto const& next_target = static_cast<Op::FinishUnwind const&>(instruction).next_target();
|
||||||
|
enter_label(&next_target, current_block);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
// Otherwise, pop the current block off, it doesn't jump anywhere.
|
// Otherwise, pop the current block off, it doesn't jump anywhere.
|
||||||
iterators.take_last();
|
iterators.take_last();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue