LibJS/Bytecode: Reorder Call instruction members to make it smaller

This commit is contained in:
Andreas Kling 2024-05-10 07:12:18 +02:00 committed by Alexander Kalenik
commit b99f0a7e22
Notes: sideshowbarker 2024-07-19 01:59:31 +09:00
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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<StringTableIndex> m_expression_string;
Optional<Builtin> m_builtin;
Optional<StringTableIndex> m_expression_string;
Operand m_arguments[];
};