mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibJS: Expose some internals of Instructions
These will be needed in the future to allow optimization passes to check against these
This commit is contained in:
parent
fd6e75fd01
commit
fafe498238
1 changed files with 22 additions and 0 deletions
|
@ -74,6 +74,8 @@ public:
|
|||
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
|
||||
void replace_references_impl(Register, Register) { }
|
||||
|
||||
Register dst() const { return m_dst; }
|
||||
|
||||
private:
|
||||
Register m_dst;
|
||||
};
|
||||
|
@ -271,6 +273,20 @@ public:
|
|||
return sizeof(*this) + sizeof(Register) * (m_element_count == 0 ? 0 : 2);
|
||||
}
|
||||
|
||||
Register start() const
|
||||
{
|
||||
VERIFY(m_element_count);
|
||||
return m_elements[0];
|
||||
}
|
||||
|
||||
Register end() const
|
||||
{
|
||||
VERIFY(m_element_count);
|
||||
return m_elements[1];
|
||||
}
|
||||
|
||||
size_t element_count() const { return m_element_count; }
|
||||
|
||||
private:
|
||||
size_t m_element_count { 0 };
|
||||
Register m_elements[];
|
||||
|
@ -406,6 +422,8 @@ public:
|
|||
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
|
||||
void replace_references_impl(Register, Register) { }
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
|
||||
private:
|
||||
IdentifierTableIndex m_identifier;
|
||||
EnvironmentMode m_mode;
|
||||
|
@ -425,6 +443,8 @@ public:
|
|||
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
|
||||
void replace_references_impl(Register, Register) { }
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
|
||||
private:
|
||||
IdentifierTableIndex m_identifier;
|
||||
|
||||
|
@ -444,6 +464,8 @@ public:
|
|||
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
|
||||
void replace_references_impl(Register, Register) { }
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
|
||||
private:
|
||||
IdentifierTableIndex m_identifier;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue