mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 12:06:07 +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
Notes:
sideshowbarker
2024-07-17 23:00:03 +09:00
Author: https://github.com/Hendiadyoin1
Commit: fafe498238
Pull-request: https://github.com/SerenityOS/serenity/pull/15754
Reviewed-by: https://github.com/alimpfard ✅
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/linusg
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