1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-29 01:22:11 +00:00

LibJS: Create static unwind mappings for BasicBlocks

This is currently only used in the bytecode dump to annotate to where
unwinds lead per block, but will be hooked up to the virtual machine in
the next commit.
This commit is contained in:
Hendiadyoin1 2023-10-19 23:18:54 +02:00 committed by Andreas Kling
parent 647f0ccd3f
commit 73f347b75c
6 changed files with 92 additions and 6 deletions

View file

@ -43,10 +43,18 @@ public:
DeprecatedString const& name() const { return m_name; }
void set_handler(BasicBlock const& handler) { m_handler = &handler; }
void set_finalizer(BasicBlock const& finalizer) { m_finalizer = &finalizer; }
BasicBlock const* handler() const { return m_handler; }
BasicBlock const* finalizer() const { return m_finalizer; }
private:
explicit BasicBlock(DeprecatedString name);
Vector<u8> m_buffer;
BasicBlock const* m_handler { nullptr };
BasicBlock const* m_finalizer { nullptr };
DeprecatedString m_name;
bool m_terminated { false };
};