mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00:00
LibJS: Add new operand type for function arguments
This allows us to directly access passed arguments instead of copying them to register/local first using GetArgument instruction.
This commit is contained in:
parent
81a3bfd492
commit
3f04d18ef7
Notes:
github-actions[bot]
2025-04-26 09:03:30 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 3f04d18ef7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4481
7 changed files with 27 additions and 93 deletions
|
@ -22,6 +22,7 @@ public:
|
|||
Register,
|
||||
Local,
|
||||
Constant,
|
||||
Argument,
|
||||
};
|
||||
|
||||
[[nodiscard]] bool operator==(Operand const&) const = default;
|
||||
|
@ -53,8 +54,8 @@ private:
|
|||
// Because this type is absolutely essential to the interpreter, we allow
|
||||
// ourselves this little ifdef.
|
||||
#if ARCH(AARCH64)
|
||||
Type m_type : 2 {};
|
||||
u32 m_index : 30 { 0 };
|
||||
Type m_type : 3 {};
|
||||
u32 m_index : 29 { 0 };
|
||||
#else
|
||||
Type m_type { Type::Invalid };
|
||||
u32 m_index { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue