mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
Everywhere: Rename JS::PropertyKey variables from property_{name => key}
PropertyKey used to be called PropertyName, but got renamed. Let's update all the variables of this type as well.
This commit is contained in:
parent
3e6aaa3520
commit
6f20f49b21
25 changed files with 435 additions and 435 deletions
|
@ -24,12 +24,12 @@ struct PropertyMetadata {
|
|||
};
|
||||
|
||||
struct TransitionKey {
|
||||
StringOrSymbol property_name;
|
||||
StringOrSymbol property_key;
|
||||
PropertyAttributes attributes { 0 };
|
||||
|
||||
bool operator==(const TransitionKey& other) const
|
||||
{
|
||||
return property_name == other.property_name && attributes == other.attributes;
|
||||
return property_key == other.property_key && attributes == other.attributes;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ public:
|
|||
|
||||
explicit Shape(ShapeWithoutGlobalObjectTag);
|
||||
explicit Shape(Object& global_object);
|
||||
Shape(Shape& previous_shape, const StringOrSymbol& property_name, PropertyAttributes attributes, TransitionType);
|
||||
Shape(Shape& previous_shape, const StringOrSymbol& property_key, PropertyAttributes attributes, TransitionType);
|
||||
Shape(Shape& previous_shape, Object* new_prototype);
|
||||
|
||||
Shape* create_put_transition(const StringOrSymbol&, PropertyAttributes attributes);
|
||||
|
@ -83,7 +83,7 @@ public:
|
|||
|
||||
void remove_property_from_unique_shape(const StringOrSymbol&, size_t offset);
|
||||
void add_property_to_unique_shape(const StringOrSymbol&, PropertyAttributes attributes);
|
||||
void reconfigure_property_in_unique_shape(const StringOrSymbol& property_name, PropertyAttributes attributes);
|
||||
void reconfigure_property_in_unique_shape(const StringOrSymbol& property_key, PropertyAttributes attributes);
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "Shape"; }
|
||||
|
@ -101,7 +101,7 @@ private:
|
|||
OwnPtr<HashMap<TransitionKey, WeakPtr<Shape>>> m_forward_transitions;
|
||||
OwnPtr<HashMap<Object*, WeakPtr<Shape>>> m_prototype_transitions;
|
||||
Shape* m_previous { nullptr };
|
||||
StringOrSymbol m_property_name;
|
||||
StringOrSymbol m_property_key;
|
||||
Object* m_prototype { nullptr };
|
||||
u32 m_property_count { 0 };
|
||||
|
||||
|
@ -116,6 +116,6 @@ template<>
|
|||
struct AK::Traits<JS::TransitionKey> : public GenericTraits<JS::TransitionKey> {
|
||||
static unsigned hash(const JS::TransitionKey& key)
|
||||
{
|
||||
return pair_int_hash(key.attributes.bits(), Traits<JS::StringOrSymbol>::hash(key.property_name));
|
||||
return pair_int_hash(key.attributes.bits(), Traits<JS::StringOrSymbol>::hash(key.property_key));
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue