mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-16 14:32:18 +00:00
LibJS/Bytecode: Reorder Call instruction members to make it smaller
This commit is contained in:
parent
96511a7d19
commit
b99f0a7e22
Notes:
sideshowbarker
2024-07-19 01:59:31 +09:00
Author: https://github.com/awesomekling
Commit: b99f0a7e22
Pull-request: https://github.com/SerenityOS/serenity/pull/24276
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/shannonbooth
2 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ namespace JS::Bytecode {
|
||||||
O(MathRound, math_round, Math, round, 1) \
|
O(MathRound, math_round, Math, round, 1) \
|
||||||
O(MathSqrt, math_sqrt, Math, sqrt, 1)
|
O(MathSqrt, math_sqrt, Math, sqrt, 1)
|
||||||
|
|
||||||
enum class Builtin {
|
enum class Builtin : u8 {
|
||||||
#define DEFINE_BUILTIN_ENUM(name, ...) name,
|
#define DEFINE_BUILTIN_ENUM(name, ...) name,
|
||||||
JS_ENUMERATE_BUILTINS(DEFINE_BUILTIN_ENUM)
|
JS_ENUMERATE_BUILTINS(DEFINE_BUILTIN_ENUM)
|
||||||
#undef DEFINE_BUILTIN_ENUM
|
#undef DEFINE_BUILTIN_ENUM
|
||||||
|
|
|
@ -1263,7 +1263,7 @@ private:
|
||||||
Label m_false_target;
|
Label m_false_target;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class CallType {
|
enum class CallType : u8 {
|
||||||
Call,
|
Call,
|
||||||
Construct,
|
Construct,
|
||||||
DirectEval,
|
DirectEval,
|
||||||
|
@ -1280,8 +1280,8 @@ public:
|
||||||
, m_this_value(this_value)
|
, m_this_value(this_value)
|
||||||
, m_argument_count(arguments.size())
|
, m_argument_count(arguments.size())
|
||||||
, m_type(type)
|
, m_type(type)
|
||||||
, m_expression_string(expression_string)
|
|
||||||
, m_builtin(builtin)
|
, m_builtin(builtin)
|
||||||
|
, m_expression_string(expression_string)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < arguments.size(); ++i)
|
for (size_t i = 0; i < arguments.size(); ++i)
|
||||||
m_arguments[i] = arguments[i];
|
m_arguments[i] = arguments[i];
|
||||||
|
@ -1311,8 +1311,8 @@ private:
|
||||||
Operand m_this_value;
|
Operand m_this_value;
|
||||||
u32 m_argument_count { 0 };
|
u32 m_argument_count { 0 };
|
||||||
CallType m_type;
|
CallType m_type;
|
||||||
Optional<StringTableIndex> m_expression_string;
|
|
||||||
Optional<Builtin> m_builtin;
|
Optional<Builtin> m_builtin;
|
||||||
|
Optional<StringTableIndex> m_expression_string;
|
||||||
Operand m_arguments[];
|
Operand m_arguments[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue