From b99f0a7e22dc634d4121155d77e42fd8ecae428f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 10 May 2024 07:12:18 +0200 Subject: [PATCH] LibJS/Bytecode: Reorder Call instruction members to make it smaller --- Userland/Libraries/LibJS/Bytecode/Builtins.h | 2 +- Userland/Libraries/LibJS/Bytecode/Op.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Builtins.h b/Userland/Libraries/LibJS/Bytecode/Builtins.h index abd2f6fb447..ee8f262b808 100644 --- a/Userland/Libraries/LibJS/Bytecode/Builtins.h +++ b/Userland/Libraries/LibJS/Bytecode/Builtins.h @@ -22,7 +22,7 @@ namespace JS::Bytecode { O(MathRound, math_round, Math, round, 1) \ O(MathSqrt, math_sqrt, Math, sqrt, 1) -enum class Builtin { +enum class Builtin : u8 { #define DEFINE_BUILTIN_ENUM(name, ...) name, JS_ENUMERATE_BUILTINS(DEFINE_BUILTIN_ENUM) #undef DEFINE_BUILTIN_ENUM diff --git a/Userland/Libraries/LibJS/Bytecode/Op.h b/Userland/Libraries/LibJS/Bytecode/Op.h index 0cd92b19c04..6d42873fe20 100644 --- a/Userland/Libraries/LibJS/Bytecode/Op.h +++ b/Userland/Libraries/LibJS/Bytecode/Op.h @@ -1263,7 +1263,7 @@ private: Label m_false_target; }; -enum class CallType { +enum class CallType : u8 { Call, Construct, DirectEval, @@ -1280,8 +1280,8 @@ public: , m_this_value(this_value) , m_argument_count(arguments.size()) , m_type(type) - , m_expression_string(expression_string) , m_builtin(builtin) + , m_expression_string(expression_string) { for (size_t i = 0; i < arguments.size(); ++i) m_arguments[i] = arguments[i]; @@ -1311,8 +1311,8 @@ private: Operand m_this_value; u32 m_argument_count { 0 }; CallType m_type; - Optional m_expression_string; Optional m_builtin; + Optional m_expression_string; Operand m_arguments[]; };