Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index d88ab4a3bf94d222c2d2d99fcca042d9f8559971..6ba4f62d671a1c14ab8154cf85c631a2a9a27d7e 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -1357,15 +1357,8 @@ Handle<Code> LoadIC::ComputeLoadHandler(LookupResult* lookup, |
if (!getter->IsJSFunction()) break; |
if (holder->IsGlobalObject()) break; |
if (!holder->HasFastProperties()) break; |
- Handle<JSFunction> function = Handle<JSFunction>::cast(getter); |
- CallOptimization call_optimization(function); |
- if (call_optimization.is_simple_api_call() && |
- call_optimization.IsCompatibleReceiver(*receiver)) { |
- return isolate()->stub_cache()->ComputeLoadCallback( |
- name, receiver, holder, call_optimization); |
- } |
return isolate()->stub_cache()->ComputeLoadViaGetter( |
- name, receiver, holder, function); |
+ name, receiver, holder, Handle<JSFunction>::cast(getter)); |
} else if (receiver->IsJSArray() && |
name->Equals(isolate()->heap()->length_string())) { |
PropertyIndex lengthIndex = |
@@ -1551,29 +1544,13 @@ Handle<Code> KeyedLoadIC::ComputeLoadHandler(LookupResult* lookup, |
case CALLBACKS: { |
Handle<Object> callback_object(lookup->GetCallbackObject(), isolate()); |
// TODO(dcarney): Handle DeclaredAccessorInfo correctly. |
- if (callback_object->IsExecutableAccessorInfo()) { |
- Handle<ExecutableAccessorInfo> callback = |
- Handle<ExecutableAccessorInfo>::cast(callback_object); |
- if (v8::ToCData<Address>(callback->getter()) == 0) break; |
- if (!callback->IsCompatibleReceiver(*receiver)) break; |
- return isolate()->stub_cache()->ComputeKeyedLoadCallback( |
- name, receiver, holder, callback); |
- } else if (callback_object->IsAccessorPair()) { |
- Handle<Object> getter( |
- Handle<AccessorPair>::cast(callback_object)->getter(), |
- isolate()); |
- if (!getter->IsJSFunction()) break; |
- if (holder->IsGlobalObject()) break; |
- if (!holder->HasFastProperties()) break; |
- Handle<JSFunction> function = Handle<JSFunction>::cast(getter); |
- CallOptimization call_optimization(function); |
- if (call_optimization.is_simple_api_call() && |
- call_optimization.IsCompatibleReceiver(*receiver)) { |
- return isolate()->stub_cache()->ComputeKeyedLoadCallback( |
- name, receiver, holder, call_optimization); |
- } |
- } |
- break; |
+ if (!callback_object->IsExecutableAccessorInfo()) break; |
+ Handle<ExecutableAccessorInfo> callback = |
+ Handle<ExecutableAccessorInfo>::cast(callback_object); |
+ if (v8::ToCData<Address>(callback->getter()) == 0) break; |
+ if (!callback->IsCompatibleReceiver(*receiver)) break; |
+ return isolate()->stub_cache()->ComputeKeyedLoadCallback( |
+ name, receiver, holder, callback); |
} |
case INTERCEPTOR: |
ASSERT(HasInterceptorGetter(lookup->holder())); |