Commit ea1dc8ee authored by yangguo@chromium.org's avatar yangguo@chromium.org

Remove uses of non-handlified GetProperty.

R=ishell@chromium.org

Review URL: https://codereview.chromium.org/229373007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3d427b55
...@@ -1108,11 +1108,6 @@ MaybeObject* Object::GetProperty(Name* key) { ...@@ -1108,11 +1108,6 @@ MaybeObject* Object::GetProperty(Name* key) {
} }
MaybeObject* Object::GetProperty(Name* key, PropertyAttributes* attributes) {
return GetPropertyWithReceiver(this, key, attributes);
}
#define FIELD_ADDR(p, offset) \ #define FIELD_ADDR(p, offset) \
(reinterpret_cast<byte*>(p) + offset - kHeapObjectTag) (reinterpret_cast<byte*>(p) + offset - kHeapObjectTag)
......
...@@ -5046,13 +5046,15 @@ Object* JSObject::GetHiddenPropertiesHashTable() { ...@@ -5046,13 +5046,15 @@ Object* JSObject::GetHiddenPropertiesHashTable() {
return GetHeap()->undefined_value(); return GetHeap()->undefined_value();
} }
} else { } else {
PropertyAttributes attributes; LookupResult result(GetIsolate());
// You can't install a getter on a property indexed by the hidden string, LocalLookupRealNamedProperty(GetHeap()->hidden_string(), &result);
// so we can be sure that GetLocalPropertyPostInterceptor returns a real if (result.IsFound()) {
// object. ASSERT(result.IsNormal());
return GetLocalPropertyPostInterceptor(this, ASSERT(result.holder() == this);
GetHeap()->hidden_string(), Object* value = GetNormalizedProperty(&result);
&attributes)->ToObjectUnchecked(); if (!value->IsTheHole()) return value;
}
return GetHeap()->undefined_value();
} }
} }
...@@ -5854,9 +5856,8 @@ Handle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk( ...@@ -5854,9 +5856,8 @@ Handle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk(
// In particular, don't try to copy the length attribute of // In particular, don't try to copy the length attribute of
// an array. // an array.
if (attributes != NONE) continue; if (attributes != NONE) continue;
Handle<Object> value( Handle<Object> value = Object::GetProperty(copy, key_string);
copy->GetProperty(*key_string, &attributes)->ToObjectUnchecked(), CHECK_NOT_EMPTY_HANDLE(isolate, value);
isolate);
if (value->IsJSObject()) { if (value->IsJSObject()) {
Handle<JSObject> result = VisitElementOrProperty( Handle<JSObject> result = VisitElementOrProperty(
copy, Handle<JSObject>::cast(value)); copy, Handle<JSObject>::cast(value));
...@@ -13314,20 +13315,6 @@ MaybeHandle<Object> JSObject::GetPropertyPostInterceptor( ...@@ -13314,20 +13315,6 @@ MaybeHandle<Object> JSObject::GetPropertyPostInterceptor(
} }
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( MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(
Handle<JSObject> object, Handle<JSObject> object,
Handle<Object> receiver, Handle<Object> receiver,
......
...@@ -1535,9 +1535,6 @@ class Object : public MaybeObject { ...@@ -1535,9 +1535,6 @@ class Object : public MaybeObject {
// Property access. // Property access.
MUST_USE_RESULT inline MaybeObject* GetProperty(Name* key); 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. // TODO(yangguo): this should eventually replace the non-handlified version.
MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithReceiver( MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithReceiver(
...@@ -2392,10 +2389,6 @@ class JSObject: public JSReceiver { ...@@ -2392,10 +2389,6 @@ class JSObject: public JSReceiver {
Handle<Object> receiver, Handle<Object> receiver,
Handle<Name> name, Handle<Name> name,
PropertyAttributes* attributes); 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 // Returns true if this is an instance of an api function and has
// been modified since it was created. May give false positives. // been modified since it was created. May give false positives.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment