| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index b2b72ac1c4aa148bed3704c4f1a9e20ff1431c37..d3a5040d7dffb5a00dddc268fb05ed431ed92e1e 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -2121,7 +2121,7 @@ inline bool IsSpecialReceiverInstanceType(InstanceType instance_type) {
|
| return instance_type <= LAST_SPECIAL_RECEIVER_TYPE;
|
| }
|
|
|
| -int JSObject::GetInternalFieldCount(Map* map) {
|
| +int JSObject::GetEmbedderFieldCount(Map* map) {
|
| int instance_size = map->instance_size();
|
| if (instance_size == kVariableSizeSentinel) return 0;
|
| InstanceType instance_type = map->instance_type();
|
| @@ -2129,27 +2129,23 @@ int JSObject::GetInternalFieldCount(Map* map) {
|
| map->GetInObjectProperties();
|
| }
|
|
|
| +int JSObject::GetEmbedderFieldCount() { return GetEmbedderFieldCount(map()); }
|
|
|
| -int JSObject::GetInternalFieldCount() { return GetInternalFieldCount(map()); }
|
| -
|
| -
|
| -int JSObject::GetInternalFieldOffset(int index) {
|
| - DCHECK(index < GetInternalFieldCount() && index >= 0);
|
| +int JSObject::GetEmbedderFieldOffset(int index) {
|
| + DCHECK(index < GetEmbedderFieldCount() && index >= 0);
|
| return GetHeaderSize() + (kPointerSize * index);
|
| }
|
|
|
| -
|
| -Object* JSObject::GetInternalField(int index) {
|
| - DCHECK(index < GetInternalFieldCount() && index >= 0);
|
| +Object* JSObject::GetEmbedderField(int index) {
|
| + DCHECK(index < GetEmbedderFieldCount() && index >= 0);
|
| // Internal objects do follow immediately after the header, whereas in-object
|
| // properties are at the end of the object. Therefore there is no need
|
| // to adjust the index here.
|
| return READ_FIELD(this, GetHeaderSize() + (kPointerSize * index));
|
| }
|
|
|
| -
|
| -void JSObject::SetInternalField(int index, Object* value) {
|
| - DCHECK(index < GetInternalFieldCount() && index >= 0);
|
| +void JSObject::SetEmbedderField(int index, Object* value) {
|
| + DCHECK(index < GetEmbedderFieldCount() && index >= 0);
|
| // Internal objects do follow immediately after the header, whereas in-object
|
| // properties are at the end of the object. Therefore there is no need
|
| // to adjust the index here.
|
| @@ -2158,9 +2154,8 @@ void JSObject::SetInternalField(int index, Object* value) {
|
| WRITE_BARRIER(GetHeap(), this, offset, value);
|
| }
|
|
|
| -
|
| -void JSObject::SetInternalField(int index, Smi* value) {
|
| - DCHECK(index < GetInternalFieldCount() && index >= 0);
|
| +void JSObject::SetEmbedderField(int index, Smi* value) {
|
| + DCHECK(index < GetEmbedderFieldCount() && index >= 0);
|
| // Internal objects do follow immediately after the header, whereas in-object
|
| // properties are at the end of the object. Therefore there is no need
|
| // to adjust the index here.
|
| @@ -5708,15 +5703,15 @@ SMI_ACCESSORS(FunctionTemplateInfo, flag, kFlagOffset)
|
| ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset)
|
| ACCESSORS(ObjectTemplateInfo, data, Object, kDataOffset)
|
|
|
| -int ObjectTemplateInfo::internal_field_count() const {
|
| +int ObjectTemplateInfo::embedder_field_count() const {
|
| Object* value = data();
|
| DCHECK(value->IsSmi());
|
| - return InternalFieldCount::decode(Smi::cast(value)->value());
|
| + return EmbedderFieldCount::decode(Smi::cast(value)->value());
|
| }
|
|
|
| -void ObjectTemplateInfo::set_internal_field_count(int count) {
|
| +void ObjectTemplateInfo::set_embedder_field_count(int count) {
|
| return set_data(Smi::FromInt(
|
| - InternalFieldCount::update(Smi::cast(data())->value(), count)));
|
| + EmbedderFieldCount::update(Smi::cast(data())->value(), count)));
|
| }
|
|
|
| bool ObjectTemplateInfo::immutable_proto() const {
|
| @@ -7577,9 +7572,9 @@ bool JSGlobalProxy::IsDetachedFrom(JSGlobalObject* global) const {
|
| return iter.GetCurrent() != global;
|
| }
|
|
|
| -inline int JSGlobalProxy::SizeWithInternalFields(int internal_field_count) {
|
| - DCHECK_GE(internal_field_count, 0);
|
| - return kSize + internal_field_count * kPointerSize;
|
| +inline int JSGlobalProxy::SizeWithEmbedderFields(int embedder_field_count) {
|
| + DCHECK_GE(embedder_field_count, 0);
|
| + return kSize + embedder_field_count * kPointerSize;
|
| }
|
|
|
| Smi* JSReceiver::GetOrCreateIdentityHash(Isolate* isolate,
|
|
|