Revision: 20619
Author: [email protected]
Date: Wed Apr 9 13:05:56 2014 UTC
Log: Remove uses of non-handlified GetProperty.
[email protected]
Review URL: https://codereview.chromium.org/229373007
http://code.google.com/p/v8/source/detail?r=20619
Modified:
/branches/bleeding_edge/src/objects-inl.h
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/objects.h
=======================================
--- /branches/bleeding_edge/src/objects-inl.h Wed Apr 9 12:21:47 2014 UTC
+++ /branches/bleeding_edge/src/objects-inl.h Wed Apr 9 13:05:56 2014 UTC
@@ -1106,11 +1106,6 @@
PropertyAttributes attributes;
return GetPropertyWithReceiver(this, key, &attributes);
}
-
-
-MaybeObject* Object::GetProperty(Name* key, PropertyAttributes*
attributes) {
- return GetPropertyWithReceiver(this, key, attributes);
-}
#define FIELD_ADDR(p, offset) \
=======================================
--- /branches/bleeding_edge/src/objects.cc Tue Apr 8 20:06:35 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc Wed Apr 9 13:05:56 2014 UTC
@@ -5046,13 +5046,15 @@
return GetHeap()->undefined_value();
}
} else {
- PropertyAttributes attributes;
- // You can't install a getter on a property indexed by the hidden
string,
- // so we can be sure that GetLocalPropertyPostInterceptor returns a
real
- // object.
- return GetLocalPropertyPostInterceptor(this,
- GetHeap()->hidden_string(),
-
&attributes)->ToObjectUnchecked();
+ LookupResult result(GetIsolate());
+ LocalLookupRealNamedProperty(GetHeap()->hidden_string(), &result);
+ if (result.IsFound()) {
+ ASSERT(result.IsNormal());
+ ASSERT(result.holder() == this);
+ Object* value = GetNormalizedProperty(&result);
+ if (!value->IsTheHole()) return value;
+ }
+ return GetHeap()->undefined_value();
}
}
@@ -5854,9 +5856,8 @@
// In particular, don't try to copy the length attribute of
// an array.
if (attributes != NONE) continue;
- Handle<Object> value(
- copy->GetProperty(*key_string,
&attributes)->ToObjectUnchecked(),
- isolate);
+ Handle<Object> value = Object::GetProperty(copy, key_string);
+ CHECK_NOT_EMPTY_HANDLE(isolate, value);
if (value->IsJSObject()) {
Handle<JSObject> result = VisitElementOrProperty(
copy, Handle<JSObject>::cast(value));
@@ -13312,20 +13313,6 @@
return GetPropertyWithReceiver(prototype, receiver, name, attributes);
}
}
-
-
-MaybeObject* JSObject::GetLocalPropertyPostInterceptor(
- Object* receiver,
- Name* name,
- PropertyAttributes* attributes) {
- // Check local property in holder, ignore interceptor.
- LookupResult result(GetIsolate());
- LocalLookupRealNamedProperty(name, &result);
- if (result.IsFound()) {
- return GetProperty(receiver, &result, name, attributes);
- }
- return GetHeap()->undefined_value();
-}
MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(
=======================================
--- /branches/bleeding_edge/src/objects.h Wed Apr 9 12:21:47 2014 UTC
+++ /branches/bleeding_edge/src/objects.h Wed Apr 9 13:05:56 2014 UTC
@@ -1535,9 +1535,6 @@
// Property access.
MUST_USE_RESULT inline MaybeObject* GetProperty(Name* key);
- MUST_USE_RESULT inline MaybeObject* GetProperty(
- Name* key,
- PropertyAttributes* attributes);
// TODO(yangguo): this should eventually replace the non-handlified
version.
MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithReceiver(
@@ -2391,10 +2388,6 @@
Handle<JSObject> object,
Handle<Object> receiver,
Handle<Name> name,
- PropertyAttributes* attributes);
- MUST_USE_RESULT MaybeObject* GetLocalPropertyPostInterceptor(
- Object* receiver,
- Name* name,
PropertyAttributes* attributes);
// Returns true if this is an instance of an api function and has
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.