LibJS: Shrink FunctionNode by using bitfields

By making the boolean members be bitfields, we shrink FunctionNode by a
total of 8 bytes.
This commit is contained in:
Andreas Kling 2022-11-26 20:07:09 +01:00 committed by Linus Groh
parent 0b2f86de71
commit 35ed82d5e6
Notes: sideshowbarker 2024-07-17 05:06:13 +09:00

View file

@ -678,10 +678,10 @@ private:
Vector<FunctionParameter> const m_parameters;
const i32 m_function_length;
FunctionKind m_kind;
bool m_is_strict_mode { false };
bool m_might_need_arguments_object { false };
bool m_contains_direct_call_to_eval { false };
bool m_is_arrow_function { false };
bool m_is_strict_mode : 1 { false };
bool m_might_need_arguments_object : 1 { false };
bool m_contains_direct_call_to_eval : 1 { false };
bool m_is_arrow_function : 1 { false };
};
class FunctionDeclaration final