Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Unified Diff: src/objects.cc

Issue 2741683004: [rename] Rename internal field to embedder field. (Closed)
Patch Set: [rename] Rename internal field to embedder field. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-body-descriptors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 60bf5d4e85bd408352667e3ed24cfe1aa762a587..71f8f5d7b1c9adf8310ad8baa116e12e8fd27844 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11914,8 +11914,8 @@ bool Map::EquivalentToForNormalization(Map* other,
mode == CLEAR_INOBJECT_PROPERTIES ? 0 : other->GetInObjectProperties();
return CheckEquivalent(this, other) && bit_field2() == other->bit_field2() &&
GetInObjectProperties() == properties &&
- JSObject::GetInternalFieldCount(this) ==
- JSObject::GetInternalFieldCount(other);
+ JSObject::GetEmbedderFieldCount(this) ==
+ JSObject::GetEmbedderFieldCount(other);
}
@@ -12792,14 +12792,14 @@ MaybeHandle<Map> JSFunction::GetDerivedMap(Isolate* isolate,
Handle<Object> prototype(function->instance_prototype(), isolate);
InstanceType instance_type = constructor_initial_map->instance_type();
DCHECK(CanSubclassHaveInobjectProperties(instance_type));
- int internal_fields =
- JSObject::GetInternalFieldCount(*constructor_initial_map);
+ int embedder_fields =
+ JSObject::GetEmbedderFieldCount(*constructor_initial_map);
int pre_allocated = constructor_initial_map->GetInObjectProperties() -
constructor_initial_map->unused_property_fields();
int instance_size;
int in_object_properties;
function->CalculateInstanceSizeForDerivedClass(
- instance_type, internal_fields, &instance_size,
+ instance_type, embedder_fields, &instance_size,
&in_object_properties);
int unused_property_fields = in_object_properties - pre_allocated;
@@ -13458,35 +13458,33 @@ int SharedFunctionInfo::SourceSize() {
}
void JSFunction::CalculateInstanceSizeHelper(InstanceType instance_type,
- int requested_internal_fields,
+ int requested_embedder_fields,
int requested_in_object_properties,
int* instance_size,
int* in_object_properties) {
int header_size = JSObject::GetHeaderSize(instance_type);
- DCHECK_LE(requested_internal_fields,
+ DCHECK_LE(requested_embedder_fields,
(JSObject::kMaxInstanceSize - header_size) >> kPointerSizeLog2);
*instance_size =
Min(header_size +
- ((requested_internal_fields + requested_in_object_properties)
+ ((requested_embedder_fields + requested_in_object_properties)
<< kPointerSizeLog2),
JSObject::kMaxInstanceSize);
*in_object_properties = ((*instance_size - header_size) >> kPointerSizeLog2) -
- requested_internal_fields;
+ requested_embedder_fields;
}
-
void JSFunction::CalculateInstanceSize(InstanceType instance_type,
- int requested_internal_fields,
+ int requested_embedder_fields,
int* instance_size,
int* in_object_properties) {
- CalculateInstanceSizeHelper(instance_type, requested_internal_fields,
+ CalculateInstanceSizeHelper(instance_type, requested_embedder_fields,
shared()->expected_nof_properties(),
instance_size, in_object_properties);
}
-
void JSFunction::CalculateInstanceSizeForDerivedClass(
- InstanceType instance_type, int requested_internal_fields,
+ InstanceType instance_type, int requested_embedder_fields,
int* instance_size, int* in_object_properties) {
Isolate* isolate = GetIsolate();
int expected_nof_properties = 0;
@@ -13501,7 +13499,7 @@ void JSFunction::CalculateInstanceSizeForDerivedClass(
break;
}
}
- CalculateInstanceSizeHelper(instance_type, requested_internal_fields,
+ CalculateInstanceSizeHelper(instance_type, requested_embedder_fields,
expected_nof_properties, instance_size,
in_object_properties);
}
@@ -19325,10 +19323,10 @@ void JSArrayBuffer::Neuter() {
void JSArrayBuffer::Setup(Handle<JSArrayBuffer> array_buffer, Isolate* isolate,
bool is_external, void* data, size_t allocated_length,
SharedFlag shared) {
- DCHECK(array_buffer->GetInternalFieldCount() ==
- v8::ArrayBuffer::kInternalFieldCount);
- for (int i = 0; i < v8::ArrayBuffer::kInternalFieldCount; i++) {
- array_buffer->SetInternalField(i, Smi::kZero);
+ DCHECK(array_buffer->GetEmbedderFieldCount() ==
+ v8::ArrayBuffer::kEmbedderFieldCount);
+ for (int i = 0; i < v8::ArrayBuffer::kEmbedderFieldCount; i++) {
+ array_buffer->SetEmbedderField(i, Smi::kZero);
}
array_buffer->set_bit_field(0);
array_buffer->set_is_external(is_external);
« no previous file with comments | « src/objects.h ('k') | src/objects-body-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698