Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index d88ab4a3bf94d222c2d2d99fcca042d9f8559971..9724c446e1f4d8e640ed55c204b9a7f7b2224c37 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -1831,6 +1831,13 @@ Handle<Code> StoreIC::ComputeStoreMonomorphic(LookupResult* lookup, |
if (!setter->IsJSFunction()) break; |
if (holder->IsGlobalObject()) break; |
if (!holder->HasFastProperties()) break; |
+ Handle<JSFunction> function = Handle<JSFunction>::cast(setter); |
+ CallOptimization call_optimization(function); |
+ if (call_optimization.is_simple_api_call() && |
+ call_optimization.IsCompatibleReceiver(*receiver)) { |
+ return isolate()->stub_cache()->ComputeStoreCallback( |
+ name, receiver, holder, call_optimization, strict_mode); |
+ } |
return isolate()->stub_cache()->ComputeStoreViaSetter( |
name, receiver, holder, Handle<JSFunction>::cast(setter), |
strict_mode); |