mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:08:10 +00:00
LibJS: Reorganize JS::Shape members a little bit
Now that AK::Weakable doesn't have a bunch of padding at the end, let's move the smaller members of JS::Shape to the end, since there's nothing to fold into at the start.
This commit is contained in:
parent
1469057033
commit
4a51165f5f
2 changed files with 9 additions and 9 deletions
|
@ -98,22 +98,22 @@ Shape::Shape(Object& global_object)
|
|||
}
|
||||
|
||||
Shape::Shape(Shape& previous_shape, const StringOrSymbol& property_name, PropertyAttributes attributes, TransitionType transition_type)
|
||||
: m_attributes(attributes)
|
||||
, m_transition_type(transition_type)
|
||||
, m_global_object(previous_shape.m_global_object)
|
||||
: m_global_object(previous_shape.m_global_object)
|
||||
, m_previous(&previous_shape)
|
||||
, m_property_name(property_name)
|
||||
, m_prototype(previous_shape.m_prototype)
|
||||
, m_property_count(transition_type == TransitionType::Put ? previous_shape.m_property_count + 1 : previous_shape.m_property_count)
|
||||
, m_attributes(attributes)
|
||||
, m_transition_type(transition_type)
|
||||
{
|
||||
}
|
||||
|
||||
Shape::Shape(Shape& previous_shape, Object* new_prototype)
|
||||
: m_transition_type(TransitionType::Prototype)
|
||||
, m_global_object(previous_shape.m_global_object)
|
||||
: m_global_object(previous_shape.m_global_object)
|
||||
, m_previous(&previous_shape)
|
||||
, m_prototype(new_prototype)
|
||||
, m_property_count(previous_shape.m_property_count)
|
||||
, m_transition_type(TransitionType::Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -98,10 +98,6 @@ private:
|
|||
|
||||
void ensure_property_table() const;
|
||||
|
||||
PropertyAttributes m_attributes { 0 };
|
||||
TransitionType m_transition_type : 6 { TransitionType::Invalid };
|
||||
bool m_unique : 1 { false };
|
||||
|
||||
Object* m_global_object { nullptr };
|
||||
|
||||
mutable OwnPtr<HashMap<StringOrSymbol, PropertyMetadata>> m_property_table;
|
||||
|
@ -112,6 +108,10 @@ private:
|
|||
StringOrSymbol m_property_name;
|
||||
Object* m_prototype { nullptr };
|
||||
size_t m_property_count { 0 };
|
||||
|
||||
PropertyAttributes m_attributes { 0 };
|
||||
TransitionType m_transition_type : 6 { TransitionType::Invalid };
|
||||
bool m_unique : 1 { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue