| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index cdf6bef9df10503738b7b4957291c229853ec796..9086da47548726d5e63fe2ebb984b6babae4ede3 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -560,7 +560,7 @@ PropertyAttributes JSObject::GetPropertyAttributeWithFailedAccessCheck(
|
| if (continue_search) {
|
| result->holder()->LookupRealNamedProperty(name, &r);
|
| } else {
|
| - result->holder()->LocalLookupRealNamedProperty(name, &r);
|
| + result->holder()->LookupOwnRealNamedProperty(name, &r);
|
| }
|
| if (!r.IsFound()) break;
|
| return GetPropertyAttributeWithFailedAccessCheck(
|
| @@ -1995,10 +1995,10 @@ MaybeHandle<Object> JSObject::SetPropertyPostInterceptor(
|
| Handle<Object> value,
|
| PropertyAttributes attributes,
|
| StrictMode strict_mode) {
|
| - // Check local property, ignore interceptor.
|
| + // Check own property, ignore interceptor.
|
| Isolate* isolate = object->GetIsolate();
|
| LookupResult result(isolate);
|
| - object->LocalLookupRealNamedProperty(name, &result);
|
| + object->LookupOwnRealNamedProperty(name, &result);
|
| if (!result.IsFound()) {
|
| object->map()->LookupTransition(*object, *name, &result);
|
| }
|
| @@ -2977,7 +2977,7 @@ MaybeHandle<Object> JSReceiver::SetProperty(Handle<JSReceiver> object,
|
| StrictMode strict_mode,
|
| StoreFromKeyed store_mode) {
|
| LookupResult result(object->GetIsolate());
|
| - object->LocalLookup(name, &result, true);
|
| + object->LookupOwn(name, &result, true);
|
| if (!result.IsFound()) {
|
| object->map()->LookupTransition(JSObject::cast(*object), *name, &result);
|
| }
|
| @@ -3125,7 +3125,7 @@ MaybeHandle<Object> JSObject::SetPropertyViaPrototypes(
|
| Isolate* isolate = object->GetIsolate();
|
|
|
| *done = false;
|
| - // We could not find a local property so let's check whether there is an
|
| + // We could not find an own property, so let's check whether there is an
|
| // accessor that wants to handle the property, or whether the property is
|
| // read-only on the prototype chain.
|
| LookupResult result(isolate);
|
| @@ -3501,20 +3501,20 @@ Handle<Map> JSObject::GetElementsTransitionMap(Handle<JSObject> object,
|
| }
|
|
|
|
|
| -void JSObject::LocalLookupRealNamedProperty(Handle<Name> name,
|
| - LookupResult* result) {
|
| +void JSObject::LookupOwnRealNamedProperty(Handle<Name> name,
|
| + LookupResult* result) {
|
| DisallowHeapAllocation no_gc;
|
| if (IsJSGlobalProxy()) {
|
| Object* proto = GetPrototype();
|
| if (proto->IsNull()) return result->NotFound();
|
| ASSERT(proto->IsJSGlobalObject());
|
| - return JSObject::cast(proto)->LocalLookupRealNamedProperty(name, result);
|
| + return JSObject::cast(proto)->LookupOwnRealNamedProperty(name, result);
|
| }
|
|
|
| if (HasFastProperties()) {
|
| map()->LookupDescriptor(this, *name, result);
|
| // A property or a map transition was found. We return all of these result
|
| - // types because LocalLookupRealNamedProperty is used when setting
|
| + // types because LookupOwnRealNamedProperty is used when setting
|
| // properties where map transitions are handled.
|
| ASSERT(!result->IsFound() ||
|
| (result->holder() == this && result->IsFastPropertyType()));
|
| @@ -3553,7 +3553,7 @@ void JSObject::LocalLookupRealNamedProperty(Handle<Name> name,
|
| void JSObject::LookupRealNamedProperty(Handle<Name> name,
|
| LookupResult* result) {
|
| DisallowHeapAllocation no_gc;
|
| - LocalLookupRealNamedProperty(name, result);
|
| + LookupOwnRealNamedProperty(name, result);
|
| if (result->IsFound()) return;
|
|
|
| LookupRealNamedPropertyInPrototypes(name, result);
|
| @@ -3571,7 +3571,7 @@ void JSObject::LookupRealNamedPropertyInPrototypes(Handle<Name> name,
|
| if (pt->IsJSProxy()) {
|
| return result->HandlerResult(JSProxy::cast(pt));
|
| }
|
| - JSObject::cast(pt)->LocalLookupRealNamedProperty(name, result);
|
| + JSObject::cast(pt)->LookupOwnRealNamedProperty(name, result);
|
| ASSERT(!(result->IsFound() && result->type() == INTERCEPTOR));
|
| if (result->IsFound()) return;
|
| }
|
| @@ -4134,10 +4134,10 @@ static void SetPropertyToField(LookupResult* lookup,
|
| }
|
|
|
|
|
| -static void ConvertAndSetLocalProperty(LookupResult* lookup,
|
| - Handle<Name> name,
|
| - Handle<Object> value,
|
| - PropertyAttributes attributes) {
|
| +static void ConvertAndSetOwnProperty(LookupResult* lookup,
|
| + Handle<Name> name,
|
| + Handle<Object> value,
|
| + PropertyAttributes attributes) {
|
| Handle<JSObject> object(lookup->holder());
|
| if (object->TooManyFastProperties()) {
|
| JSObject::NormalizeProperties(object, CLEAR_INOBJECT_PROPERTIES, 0);
|
| @@ -4172,7 +4172,7 @@ static void SetPropertyToFieldWithAttributes(LookupResult* lookup,
|
| if (value->IsUninitialized()) return;
|
| SetPropertyToField(lookup, value);
|
| } else {
|
| - ConvertAndSetLocalProperty(lookup, name, value, attributes);
|
| + ConvertAndSetOwnProperty(lookup, name, value, attributes);
|
| }
|
| }
|
|
|
| @@ -4295,7 +4295,7 @@ MaybeHandle<Object> JSObject::SetPropertyForResult(
|
| EnqueueChangeRecord(object, "add", name, old_value);
|
| } else {
|
| LookupResult new_lookup(isolate);
|
| - object->LocalLookup(name, &new_lookup, true);
|
| + object->LookupOwn(name, &new_lookup, true);
|
| if (new_lookup.IsDataProperty()) {
|
| Handle<Object> new_value =
|
| Object::GetPropertyOrElement(object, name).ToHandleChecked();
|
| @@ -4310,7 +4310,7 @@ MaybeHandle<Object> JSObject::SetPropertyForResult(
|
| }
|
|
|
|
|
| -// Set a real local property, even if it is READ_ONLY. If the property is not
|
| +// Set a real own property, even if it is READ_ONLY. If the property is not
|
| // present, add it with attributes NONE. This code is an exact clone of
|
| // SetProperty, with the check for IsReadOnly and the check for a
|
| // callback setter removed. The two lines looking up the LookupResult
|
| @@ -4319,7 +4319,7 @@ MaybeHandle<Object> JSObject::SetPropertyForResult(
|
| // Note that this method cannot be used to set the prototype of a function
|
| // because ConvertDescriptorToField() which is called in "case CALLBACKS:"
|
| // doesn't handle function prototypes correctly.
|
| -MaybeHandle<Object> JSObject::SetLocalPropertyIgnoreAttributes(
|
| +MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
|
| Handle<JSObject> object,
|
| Handle<Name> name,
|
| Handle<Object> value,
|
| @@ -4335,7 +4335,7 @@ MaybeHandle<Object> JSObject::SetLocalPropertyIgnoreAttributes(
|
| AssertNoContextChange ncc(isolate);
|
|
|
| LookupResult lookup(isolate);
|
| - object->LocalLookup(name, &lookup, true);
|
| + object->LookupOwn(name, &lookup, true);
|
| if (!lookup.IsFound()) {
|
| object->map()->LookupTransition(*object, *name, &lookup);
|
| }
|
| @@ -4352,13 +4352,13 @@ MaybeHandle<Object> JSObject::SetLocalPropertyIgnoreAttributes(
|
| Handle<Object> proto(object->GetPrototype(), isolate);
|
| if (proto->IsNull()) return value;
|
| ASSERT(proto->IsJSGlobalObject());
|
| - return SetLocalPropertyIgnoreAttributes(Handle<JSObject>::cast(proto),
|
| + return SetOwnPropertyIgnoreAttributes(Handle<JSObject>::cast(proto),
|
| name, value, attributes, value_type, mode, extensibility_check);
|
| }
|
|
|
| if (lookup.IsInterceptor() ||
|
| (lookup.IsDescriptorOrDictionary() && lookup.type() == CALLBACKS)) {
|
| - object->LocalLookupRealNamedProperty(name, &lookup);
|
| + object->LookupOwnRealNamedProperty(name, &lookup);
|
| }
|
|
|
| // Check for accessor in prototype chain removed here in clone.
|
| @@ -4406,7 +4406,7 @@ MaybeHandle<Object> JSObject::SetLocalPropertyIgnoreAttributes(
|
| }
|
| break;
|
| case CALLBACKS:
|
| - ConvertAndSetLocalProperty(&lookup, name, value, attributes);
|
| + ConvertAndSetOwnProperty(&lookup, name, value, attributes);
|
| break;
|
| case NONEXISTENT:
|
| case HANDLER:
|
| @@ -4422,7 +4422,7 @@ MaybeHandle<Object> JSObject::SetLocalPropertyIgnoreAttributes(
|
| EnqueueChangeRecord(object, "reconfigure", name, old_value);
|
| } else {
|
| LookupResult new_lookup(isolate);
|
| - object->LocalLookup(name, &new_lookup, true);
|
| + object->LookupOwn(name, &new_lookup, true);
|
| bool value_changed = false;
|
| if (new_lookup.IsDataProperty()) {
|
| Handle<Object> new_value =
|
| @@ -4447,10 +4447,10 @@ PropertyAttributes JSObject::GetPropertyAttributePostInterceptor(
|
| Handle<JSObject> receiver,
|
| Handle<Name> name,
|
| bool continue_search) {
|
| - // Check local property, ignore interceptor.
|
| + // Check own property, ignore interceptor.
|
| Isolate* isolate = object->GetIsolate();
|
| LookupResult result(isolate);
|
| - object->LocalLookupRealNamedProperty(name, &result);
|
| + object->LookupOwnRealNamedProperty(name, &result);
|
| if (result.IsFound()) return result.GetAttributes();
|
|
|
| if (continue_search) {
|
| @@ -4564,16 +4564,16 @@ PropertyAttributes JSReceiver::GetPropertyAttributeForResult(
|
| }
|
|
|
|
|
| -PropertyAttributes JSReceiver::GetLocalPropertyAttribute(
|
| +PropertyAttributes JSReceiver::GetOwnPropertyAttribute(
|
| Handle<JSReceiver> object, Handle<Name> name) {
|
| // Check whether the name is an array index.
|
| uint32_t index = 0;
|
| if (object->IsJSObject() && name->AsArrayIndex(&index)) {
|
| - return GetLocalElementAttribute(object, index);
|
| + return GetOwnElementAttribute(object, index);
|
| }
|
| // Named property.
|
| LookupResult lookup(object->GetIsolate());
|
| - object->LocalLookup(name, &lookup, true);
|
| + object->LookupOwn(name, &lookup, true);
|
| return GetPropertyAttributeForResult(object, object, &lookup, name, false);
|
| }
|
|
|
| @@ -5280,7 +5280,7 @@ Object* JSObject::GetHiddenPropertiesHashTable() {
|
| } else {
|
| Isolate* isolate = GetIsolate();
|
| LookupResult result(isolate);
|
| - LocalLookupRealNamedProperty(isolate->factory()->hidden_string(), &result);
|
| + LookupOwnRealNamedProperty(isolate->factory()->hidden_string(), &result);
|
| if (result.IsFound()) {
|
| ASSERT(result.IsNormal());
|
| ASSERT(result.holder() == this);
|
| @@ -5312,7 +5312,7 @@ Handle<ObjectHashTable> JSObject::GetOrCreateHiddenPropertiesHashtable(
|
| inline_value);
|
| }
|
|
|
| - JSObject::SetLocalPropertyIgnoreAttributes(
|
| + JSObject::SetOwnPropertyIgnoreAttributes(
|
| object,
|
| isolate->factory()->hidden_string(),
|
| hashtable,
|
| @@ -5350,13 +5350,13 @@ Handle<Object> JSObject::SetHiddenPropertiesHashTable(Handle<JSObject> object,
|
| }
|
| }
|
|
|
| - SetLocalPropertyIgnoreAttributes(object,
|
| - isolate->factory()->hidden_string(),
|
| - value,
|
| - DONT_ENUM,
|
| - OPTIMAL_REPRESENTATION,
|
| - ALLOW_AS_CONSTANT,
|
| - OMIT_EXTENSIBILITY_CHECK).Assert();
|
| + SetOwnPropertyIgnoreAttributes(object,
|
| + isolate->factory()->hidden_string(),
|
| + value,
|
| + DONT_ENUM,
|
| + OPTIMAL_REPRESENTATION,
|
| + ALLOW_AS_CONSTANT,
|
| + OMIT_EXTENSIBILITY_CHECK).Assert();
|
| return object;
|
| }
|
|
|
| @@ -5364,10 +5364,10 @@ Handle<Object> JSObject::SetHiddenPropertiesHashTable(Handle<JSObject> object,
|
| Handle<Object> JSObject::DeletePropertyPostInterceptor(Handle<JSObject> object,
|
| Handle<Name> name,
|
| DeleteMode mode) {
|
| - // Check local property, ignore interceptor.
|
| + // Check own property, ignore interceptor.
|
| Isolate* isolate = object->GetIsolate();
|
| LookupResult result(isolate);
|
| - object->LocalLookupRealNamedProperty(name, &result);
|
| + object->LookupOwnRealNamedProperty(name, &result);
|
| if (!result.IsFound()) return isolate->factory()->true_value();
|
|
|
| // Normalize object if needed.
|
| @@ -5480,9 +5480,9 @@ MaybeHandle<Object> JSObject::DeleteElement(Handle<JSObject> object,
|
| Handle<Object> old_value;
|
| bool should_enqueue_change_record = false;
|
| if (object->map()->is_observed()) {
|
| - should_enqueue_change_record = HasLocalElement(object, index);
|
| + should_enqueue_change_record = HasOwnElement(object, index);
|
| if (should_enqueue_change_record) {
|
| - if (!GetLocalElementAccessorPair(object, index).is_null()) {
|
| + if (!GetOwnElementAccessorPair(object, index).is_null()) {
|
| old_value = Handle<Object>::cast(factory->the_hole_value());
|
| } else {
|
| old_value = Object::GetElement(
|
| @@ -5501,7 +5501,7 @@ MaybeHandle<Object> JSObject::DeleteElement(Handle<JSObject> object,
|
| Handle<Object> result;
|
| ASSIGN_RETURN_ON_EXCEPTION(isolate, result, maybe_result, Object);
|
|
|
| - if (should_enqueue_change_record && !HasLocalElement(object, index)) {
|
| + if (should_enqueue_change_record && !HasOwnElement(object, index)) {
|
| Handle<String> name = factory->Uint32ToString(index);
|
| EnqueueChangeRecord(object, "delete", name, old_value);
|
| }
|
| @@ -5539,7 +5539,7 @@ MaybeHandle<Object> JSObject::DeleteProperty(Handle<JSObject> object,
|
| }
|
|
|
| LookupResult lookup(isolate);
|
| - object->LocalLookup(name, &lookup, true);
|
| + object->LookupOwn(name, &lookup, true);
|
| if (!lookup.IsFound()) return isolate->factory()->true_value();
|
| // Ignore attributes if forcing a deletion.
|
| if (lookup.IsDontDelete() && mode != FORCE_DELETION) {
|
| @@ -5580,7 +5580,7 @@ MaybeHandle<Object> JSObject::DeleteProperty(Handle<JSObject> object,
|
| result = DeleteNormalizedProperty(object, name, mode);
|
| }
|
|
|
| - if (is_observed && !HasLocalProperty(object, name)) {
|
| + if (is_observed && !HasOwnProperty(object, name)) {
|
| EnqueueChangeRecord(object, "delete", name, old_value);
|
| }
|
|
|
| @@ -6034,7 +6034,7 @@ MaybeHandle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk(
|
| if (!shallow) {
|
| HandleScope scope(isolate);
|
|
|
| - // Deep copy local properties.
|
| + // Deep copy own properties.
|
| if (copy->HasFastProperties()) {
|
| Handle<DescriptorArray> descriptors(copy->map()->instance_descriptors());
|
| int limit = copy->map()->NumberOfOwnDescriptors();
|
| @@ -6058,13 +6058,13 @@ MaybeHandle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk(
|
| }
|
| } else {
|
| Handle<FixedArray> names =
|
| - isolate->factory()->NewFixedArray(copy->NumberOfLocalProperties());
|
| - copy->GetLocalPropertyNames(*names, 0);
|
| + isolate->factory()->NewFixedArray(copy->NumberOfOwnProperties());
|
| + copy->GetOwnPropertyNames(*names, 0);
|
| for (int i = 0; i < names->length(); i++) {
|
| ASSERT(names->get(i)->IsString());
|
| Handle<String> key_string(String::cast(names->get(i)));
|
| PropertyAttributes attributes =
|
| - JSReceiver::GetLocalPropertyAttribute(copy, key_string);
|
| + JSReceiver::GetOwnPropertyAttribute(copy, key_string);
|
| // Only deep copy fields from the object literal expression.
|
| // In particular, don't try to copy the length attribute of
|
| // an array.
|
| @@ -6086,7 +6086,7 @@ MaybeHandle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk(
|
| }
|
| }
|
|
|
| - // Deep copy local elements.
|
| + // Deep copy own elements.
|
| // Pixel elements cannot be created using an object literal.
|
| ASSERT(!copy->HasExternalArrayElements());
|
| switch (kind) {
|
| @@ -6298,7 +6298,7 @@ int Map::NextFreePropertyIndex() {
|
| }
|
|
|
|
|
| -void JSReceiver::LocalLookup(
|
| +void JSReceiver::LookupOwn(
|
| Handle<Name> name, LookupResult* result, bool search_hidden_prototypes) {
|
| DisallowHeapAllocation no_gc;
|
| ASSERT(name->IsName());
|
| @@ -6307,7 +6307,7 @@ void JSReceiver::LocalLookup(
|
| Object* proto = GetPrototype();
|
| if (proto->IsNull()) return result->NotFound();
|
| ASSERT(proto->IsJSGlobalObject());
|
| - return JSReceiver::cast(proto)->LocalLookup(
|
| + return JSReceiver::cast(proto)->LookupOwn(
|
| name, result, search_hidden_prototypes);
|
| }
|
|
|
| @@ -6331,14 +6331,14 @@ void JSReceiver::LocalLookup(
|
| return;
|
| }
|
|
|
| - js_object->LocalLookupRealNamedProperty(name, result);
|
| + js_object->LookupOwnRealNamedProperty(name, result);
|
| if (result->IsFound() || !search_hidden_prototypes) return;
|
|
|
| Object* proto = js_object->GetPrototype();
|
| if (!proto->IsJSReceiver()) return;
|
| JSReceiver* receiver = JSReceiver::cast(proto);
|
| if (receiver->map()->is_hidden_prototype()) {
|
| - receiver->LocalLookup(name, result, search_hidden_prototypes);
|
| + receiver->LookupOwn(name, result, search_hidden_prototypes);
|
| }
|
| }
|
|
|
| @@ -6350,7 +6350,7 @@ void JSReceiver::Lookup(Handle<Name> name, LookupResult* result) {
|
| for (Object* current = this;
|
| current != *null_value;
|
| current = JSObject::cast(current)->GetPrototype()) {
|
| - JSReceiver::cast(current)->LocalLookup(name, result, false);
|
| + JSReceiver::cast(current)->LookupOwn(name, result, false);
|
| if (result->IsFound()) return;
|
| }
|
| result->NotFound();
|
| @@ -6364,7 +6364,7 @@ void JSObject::LookupCallbackProperty(Handle<Name> name, LookupResult* result) {
|
| for (Object* current = this;
|
| current != *null_value && current->IsJSObject();
|
| current = JSObject::cast(current)->GetPrototype()) {
|
| - JSObject::cast(current)->LocalLookupRealNamedProperty(name, result);
|
| + JSObject::cast(current)->LookupOwnRealNamedProperty(name, result);
|
| if (result->IsPropertyCallbacks()) return;
|
| }
|
| result->NotFound();
|
| @@ -6604,9 +6604,9 @@ MaybeHandle<FixedArray> JSReceiver::GetKeys(Handle<JSReceiver> object,
|
| ASSERT(ContainsOnlyValidKeys(content));
|
| }
|
|
|
| - // If we only want local properties we bail out after the first
|
| + // If we only want own properties we bail out after the first
|
| // iteration.
|
| - if (type == LOCAL_ONLY) break;
|
| + if (type == OWN_ONLY) break;
|
| }
|
| return content;
|
| }
|
| @@ -6711,7 +6711,7 @@ Handle<AccessorPair> JSObject::CreateAccessorPairFor(Handle<JSObject> object,
|
| Handle<Name> name) {
|
| Isolate* isolate = object->GetIsolate();
|
| LookupResult result(isolate);
|
| - object->LocalLookupRealNamedProperty(name, &result);
|
| + object->LookupOwnRealNamedProperty(name, &result);
|
| if (result.IsPropertyCallbacks()) {
|
| // Note that the result can actually have IsDontDelete() == true when we
|
| // e.g. have to fall back to the slow case while adding a setter after
|
| @@ -6918,14 +6918,14 @@ void JSObject::DefineAccessor(Handle<JSObject> object,
|
| bool preexists = false;
|
| if (is_observed) {
|
| if (is_element) {
|
| - preexists = HasLocalElement(object, index);
|
| - if (preexists && GetLocalElementAccessorPair(object, index).is_null()) {
|
| + preexists = HasOwnElement(object, index);
|
| + if (preexists && GetOwnElementAccessorPair(object, index).is_null()) {
|
| old_value =
|
| Object::GetElement(isolate, object, index).ToHandleChecked();
|
| }
|
| } else {
|
| LookupResult lookup(isolate);
|
| - object->LocalLookup(name, &lookup, true);
|
| + object->LookupOwn(name, &lookup, true);
|
| preexists = lookup.IsProperty();
|
| if (preexists && lookup.IsDataProperty()) {
|
| old_value =
|
| @@ -6986,7 +6986,7 @@ bool JSObject::DefineFastAccessor(Handle<JSObject> object,
|
| ASSERT(accessor->IsSpecFunction() || accessor->IsUndefined());
|
| Isolate* isolate = object->GetIsolate();
|
| LookupResult result(isolate);
|
| - object->LocalLookup(name, &result);
|
| + object->LookupOwn(name, &result);
|
|
|
| if (result.IsFound() && !result.IsPropertyCallbacks()) {
|
| return false;
|
| @@ -7121,7 +7121,7 @@ MaybeHandle<Object> JSObject::SetAccessor(Handle<JSObject> object,
|
| } else {
|
| // Lookup the name.
|
| LookupResult result(isolate);
|
| - object->LocalLookup(name, &result, true);
|
| + object->LookupOwn(name, &result, true);
|
| // ES5 forbids turning a property into an accessor if it's not
|
| // configurable (that is IsDontDelete in ES3 and v8), see 8.6.1 (Table 5).
|
| if (result.IsFound() && (result.IsReadOnly() || result.IsDontDelete())) {
|
| @@ -7177,7 +7177,7 @@ MaybeHandle<Object> JSObject::GetAccessor(Handle<JSObject> object,
|
| !obj->IsNull();
|
| obj = handle(JSReceiver::cast(*obj)->GetPrototype(), isolate)) {
|
| LookupResult result(isolate);
|
| - JSReceiver::cast(*obj)->LocalLookup(name, &result);
|
| + JSReceiver::cast(*obj)->LookupOwn(name, &result);
|
| if (result.IsFound()) {
|
| if (result.IsReadOnly()) return isolate->factory()->undefined_value();
|
| if (result.IsPropertyCallbacks()) {
|
| @@ -8807,7 +8807,7 @@ int Relocatable::ArchiveSpacePerThread() {
|
| }
|
|
|
|
|
| -// Archive statics that are thread local.
|
| +// Archive statics that are thread-local.
|
| char* Relocatable::ArchiveState(Isolate* isolate, char* to) {
|
| *reinterpret_cast<Relocatable**>(to) = isolate->relocatable_top();
|
| isolate->set_relocatable_top(NULL);
|
| @@ -8815,7 +8815,7 @@ char* Relocatable::ArchiveState(Isolate* isolate, char* to) {
|
| }
|
|
|
|
|
| -// Restore statics that are thread local.
|
| +// Restore statics that are thread-local.
|
| char* Relocatable::RestoreState(Isolate* isolate, char* from) {
|
| isolate->set_relocatable_top(*reinterpret_cast<Relocatable**>(from));
|
| return from + ArchiveSpacePerThread();
|
| @@ -11899,11 +11899,11 @@ static bool GetOldValue(Isolate* isolate,
|
| List<Handle<Object> >* old_values,
|
| List<uint32_t>* indices) {
|
| PropertyAttributes attributes =
|
| - JSReceiver::GetLocalElementAttribute(object, index);
|
| + JSReceiver::GetOwnElementAttribute(object, index);
|
| ASSERT(attributes != ABSENT);
|
| if (attributes == DONT_DELETE) return false;
|
| Handle<Object> value;
|
| - if (!JSObject::GetLocalElementAccessorPair(object, index).is_null()) {
|
| + if (!JSObject::GetOwnElementAccessorPair(object, index).is_null()) {
|
| value = Handle<Object>::cast(isolate->factory()->the_hole_value());
|
| } else {
|
| value = Object::GetElement(isolate, object, index).ToHandleChecked();
|
| @@ -11979,7 +11979,7 @@ MaybeHandle<Object> JSArray::SetElementsLength(
|
| CHECK(new_length_handle->ToArrayIndex(&new_length));
|
|
|
| static const PropertyAttributes kNoAttrFilter = NONE;
|
| - int num_elements = array->NumberOfLocalElements(kNoAttrFilter);
|
| + int num_elements = array->NumberOfOwnElements(kNoAttrFilter);
|
| if (num_elements > 0) {
|
| if (old_length == static_cast<uint32_t>(num_elements)) {
|
| // Simple case for arrays without holes.
|
| @@ -11991,7 +11991,7 @@ MaybeHandle<Object> JSArray::SetElementsLength(
|
| // TODO(rafaelw): For fast, sparse arrays, we can avoid iterating over
|
| // the to-be-removed indices twice.
|
| Handle<FixedArray> keys = isolate->factory()->NewFixedArray(num_elements);
|
| - array->GetLocalElementKeys(*keys, kNoAttrFilter);
|
| + array->GetOwnElementKeys(*keys, kNoAttrFilter);
|
| while (num_elements-- > 0) {
|
| uint32_t index = NumberToUint32(keys->get(num_elements));
|
| if (index < new_length) break;
|
| @@ -12484,17 +12484,17 @@ void JSObject::EnsureCanContainElements(Handle<JSObject> object,
|
| }
|
|
|
|
|
| -MaybeHandle<AccessorPair> JSObject::GetLocalPropertyAccessorPair(
|
| +MaybeHandle<AccessorPair> JSObject::GetOwnPropertyAccessorPair(
|
| Handle<JSObject> object,
|
| Handle<Name> name) {
|
| uint32_t index = 0;
|
| if (name->AsArrayIndex(&index)) {
|
| - return GetLocalElementAccessorPair(object, index);
|
| + return GetOwnElementAccessorPair(object, index);
|
| }
|
|
|
| Isolate* isolate = object->GetIsolate();
|
| LookupResult lookup(isolate);
|
| - object->LocalLookupRealNamedProperty(name, &lookup);
|
| + object->LookupOwnRealNamedProperty(name, &lookup);
|
|
|
| if (lookup.IsPropertyCallbacks() &&
|
| lookup.GetCallbackObject()->IsAccessorPair()) {
|
| @@ -12504,14 +12504,14 @@ MaybeHandle<AccessorPair> JSObject::GetLocalPropertyAccessorPair(
|
| }
|
|
|
|
|
| -MaybeHandle<AccessorPair> JSObject::GetLocalElementAccessorPair(
|
| +MaybeHandle<AccessorPair> JSObject::GetOwnElementAccessorPair(
|
| Handle<JSObject> object,
|
| uint32_t index) {
|
| if (object->IsJSGlobalProxy()) {
|
| Handle<Object> proto(object->GetPrototype(), object->GetIsolate());
|
| if (proto->IsNull()) return MaybeHandle<AccessorPair>();
|
| ASSERT(proto->IsJSGlobalObject());
|
| - return GetLocalElementAccessorPair(Handle<JSObject>::cast(proto), index);
|
| + return GetOwnElementAccessorPair(Handle<JSObject>::cast(proto), index);
|
| }
|
|
|
| // Check for lookup interceptor.
|
| @@ -13149,13 +13149,13 @@ MaybeHandle<Object> JSObject::SetElement(Handle<JSObject> object,
|
| }
|
|
|
| PropertyAttributes old_attributes =
|
| - JSReceiver::GetLocalElementAttribute(object, index);
|
| + JSReceiver::GetOwnElementAttribute(object, index);
|
| Handle<Object> old_value = isolate->factory()->the_hole_value();
|
| Handle<Object> old_length_handle;
|
| Handle<Object> new_length_handle;
|
|
|
| if (old_attributes != ABSENT) {
|
| - if (GetLocalElementAccessorPair(object, index).is_null()) {
|
| + if (GetOwnElementAccessorPair(object, index).is_null()) {
|
| old_value = Object::GetElement(isolate, object, index).ToHandleChecked();
|
| }
|
| } else if (object->IsJSArray()) {
|
| @@ -13178,7 +13178,7 @@ MaybeHandle<Object> JSObject::SetElement(Handle<JSObject> object,
|
| Object);
|
|
|
| Handle<String> name = isolate->factory()->Uint32ToString(index);
|
| - PropertyAttributes new_attributes = GetLocalElementAttribute(object, index);
|
| + PropertyAttributes new_attributes = GetOwnElementAttribute(object, index);
|
| if (old_attributes == ABSENT) {
|
| if (object->IsJSArray() &&
|
| !old_length_handle->SameValue(
|
| @@ -13815,10 +13815,10 @@ MaybeHandle<Object> JSObject::GetPropertyPostInterceptor(
|
| Handle<Object> receiver,
|
| Handle<Name> name,
|
| PropertyAttributes* attributes) {
|
| - // Check local property in holder, ignore interceptor.
|
| + // Check own property in holder, ignore interceptor.
|
| Isolate* isolate = object->GetIsolate();
|
| LookupResult lookup(isolate);
|
| - object->LocalLookupRealNamedProperty(name, &lookup);
|
| + object->LookupOwnRealNamedProperty(name, &lookup);
|
| if (lookup.IsFound()) {
|
| return GetProperty(object, receiver, &lookup, name, attributes);
|
| } else {
|
| @@ -13932,7 +13932,7 @@ bool JSObject::HasRealNamedProperty(Handle<JSObject> object,
|
| }
|
|
|
| LookupResult result(isolate);
|
| - object->LocalLookupRealNamedProperty(key, &result);
|
| + object->LookupOwnRealNamedProperty(key, &result);
|
| return result.IsFound() && !result.IsInterceptor();
|
| }
|
|
|
| @@ -13976,12 +13976,12 @@ bool JSObject::HasRealNamedCallbackProperty(Handle<JSObject> object,
|
| }
|
|
|
| LookupResult result(isolate);
|
| - object->LocalLookupRealNamedProperty(key, &result);
|
| + object->LookupOwnRealNamedProperty(key, &result);
|
| return result.IsPropertyCallbacks();
|
| }
|
|
|
|
|
| -int JSObject::NumberOfLocalProperties(PropertyAttributes filter) {
|
| +int JSObject::NumberOfOwnProperties(PropertyAttributes filter) {
|
| if (HasFastProperties()) {
|
| Map* map = this->map();
|
| if (filter == NONE) return map->NumberOfOwnDescriptors();
|
| @@ -14108,12 +14108,12 @@ void FixedArray::SortPairs(FixedArray* numbers, uint32_t len) {
|
| }
|
|
|
|
|
| -// Fill in the names of local properties into the supplied storage. The main
|
| +// Fill in the names of own properties into the supplied storage. The main
|
| // purpose of this function is to provide reflection information for the object
|
| // mirrors.
|
| -void JSObject::GetLocalPropertyNames(
|
| +void JSObject::GetOwnPropertyNames(
|
| FixedArray* storage, int index, PropertyAttributes filter) {
|
| - ASSERT(storage->length() >= (NumberOfLocalProperties(filter) - index));
|
| + ASSERT(storage->length() >= (NumberOfOwnProperties(filter) - index));
|
| if (HasFastProperties()) {
|
| int real_size = map()->NumberOfOwnDescriptors();
|
| DescriptorArray* descs = map()->instance_descriptors();
|
| @@ -14132,8 +14132,8 @@ void JSObject::GetLocalPropertyNames(
|
| }
|
|
|
|
|
| -int JSObject::NumberOfLocalElements(PropertyAttributes filter) {
|
| - return GetLocalElementKeys(NULL, filter);
|
| +int JSObject::NumberOfOwnElements(PropertyAttributes filter) {
|
| + return GetOwnElementKeys(NULL, filter);
|
| }
|
|
|
|
|
| @@ -14147,12 +14147,12 @@ int JSObject::NumberOfEnumElements() {
|
| if (length == 0) return 0;
|
| }
|
| // Compute the number of enumerable elements.
|
| - return NumberOfLocalElements(static_cast<PropertyAttributes>(DONT_ENUM));
|
| + return NumberOfOwnElements(static_cast<PropertyAttributes>(DONT_ENUM));
|
| }
|
|
|
|
|
| -int JSObject::GetLocalElementKeys(FixedArray* storage,
|
| - PropertyAttributes filter) {
|
| +int JSObject::GetOwnElementKeys(FixedArray* storage,
|
| + PropertyAttributes filter) {
|
| int counter = 0;
|
| switch (GetElementsKind()) {
|
| case FAST_SMI_ELEMENTS:
|
| @@ -14278,8 +14278,7 @@ int JSObject::GetLocalElementKeys(FixedArray* storage,
|
|
|
|
|
| int JSObject::GetEnumElementKeys(FixedArray* storage) {
|
| - return GetLocalElementKeys(storage,
|
| - static_cast<PropertyAttributes>(DONT_ENUM));
|
| + return GetOwnElementKeys(storage, static_cast<PropertyAttributes>(DONT_ENUM));
|
| }
|
|
|
|
|
| @@ -17021,7 +17020,7 @@ Object* JSDate::DoGetField(FieldIndex index) {
|
| // Since the stamp is not NaN, the value is also not NaN.
|
| int64_t local_time_ms =
|
| date_cache->ToLocal(static_cast<int64_t>(value()->Number()));
|
| - SetLocalFields(local_time_ms, date_cache);
|
| + SetCachedFields(local_time_ms, date_cache);
|
| }
|
| switch (index) {
|
| case kYear: return year();
|
| @@ -17114,7 +17113,7 @@ void JSDate::SetValue(Object* value, bool is_value_nan) {
|
| }
|
|
|
|
|
| -void JSDate::SetLocalFields(int64_t local_time_ms, DateCache* date_cache) {
|
| +void JSDate::SetCachedFields(int64_t local_time_ms, DateCache* date_cache) {
|
| int days = DateCache::DaysFromTime(local_time_ms);
|
| int time_in_day_ms = DateCache::TimeInDay(local_time_ms, days);
|
| int year, month, day;
|
|
|