diff --git a/Libraries/LibJS/Runtime/Shape.cpp b/Libraries/LibJS/Runtime/Shape.cpp index 5e018465f3..6c78e7c8d6 100644 --- a/Libraries/LibJS/Runtime/Shape.cpp +++ b/Libraries/LibJS/Runtime/Shape.cpp @@ -73,21 +73,21 @@ Shape::Shape(GlobalObject& global_object) } Shape::Shape(Shape& previous_shape, const StringOrSymbol& property_name, PropertyAttributes attributes, TransitionType transition_type) - : m_global_object(previous_shape.m_global_object) + : m_attributes(attributes) + , m_transition_type(transition_type) + , m_global_object(previous_shape.m_global_object) , m_previous(&previous_shape) , m_property_name(property_name) - , m_attributes(attributes) , m_prototype(previous_shape.m_prototype) - , m_transition_type(transition_type) , m_property_count(transition_type == TransitionType::Put ? previous_shape.m_property_count + 1 : previous_shape.m_property_count) { } Shape::Shape(Shape& previous_shape, Object* new_prototype) - : m_global_object(previous_shape.m_global_object) + : m_transition_type(TransitionType::Prototype) + , m_global_object(previous_shape.m_global_object) , m_previous(&previous_shape) , m_prototype(new_prototype) - , m_transition_type(TransitionType::Prototype) , m_property_count(previous_shape.m_property_count) { } diff --git a/Libraries/LibJS/Runtime/Shape.h b/Libraries/LibJS/Runtime/Shape.h index 3c2f402a86..7f50352dec 100644 --- a/Libraries/LibJS/Runtime/Shape.h +++ b/Libraries/LibJS/Runtime/Shape.h @@ -103,6 +103,11 @@ private: void ensure_property_table() const; + PropertyAttributes m_attributes { 0 }; + TransitionType m_transition_type : 6 { TransitionType::Invalid }; + bool m_unique : 1 { false }; + mutable bool m_has_property_table : 1 { false }; + GlobalObject& m_global_object; mutable OwnPtr> m_property_table; @@ -110,10 +115,7 @@ private: HashMap m_forward_transitions; Shape* m_previous { nullptr }; StringOrSymbol m_property_name; - PropertyAttributes m_attributes { 0 }; - bool m_unique { false }; Object* m_prototype { nullptr }; - TransitionType m_transition_type { TransitionType::Invalid }; size_t m_property_count { 0 }; };