Index: src/ic/ic.cc |
diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
index bd5338a694e34e563269d2a1072eec6544471420..c176015d3e95c02482c89229516b64c7f871362a 100644 |
--- a/src/ic/ic.cc |
+++ b/src/ic/ic.cc |
@@ -1067,8 +1067,10 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup, |
if (call_optimization.is_simple_api_call()) { |
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadCallback); |
int index = lookup->GetAccessorIndex(); |
- return compiler.CompileLoadCallback(lookup->name(), |
- call_optimization, index); |
+ Handle<Code> code = compiler.CompileLoadCallback( |
+ lookup->name(), call_optimization, index); |
+ if (FLAG_runtime_call_stats) return slow_stub(); |
+ return code; |
} |
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadViaGetter); |
int expected_arguments = Handle<JSFunction>::cast(getter) |
@@ -1095,7 +1097,10 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup, |
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadCallback); |
NamedLoadHandlerCompiler compiler(isolate(), map, holder, |
cache_holder); |
- return compiler.CompileLoadCallback(lookup->name(), info); |
+ Handle<Code> code = |
+ compiler.CompileLoadCallback(lookup->name(), info); |
+ if (FLAG_runtime_call_stats) return slow_stub(); |
+ return code; |
} |
} |
break; |
@@ -1583,8 +1588,10 @@ Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup, |
if (info->is_sloppy() && !receiver->IsJSReceiver()) break; |
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreCallback); |
NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); |
- return compiler.CompileStoreCallback(receiver, lookup->name(), info, |
- language_mode()); |
+ Handle<Code> code = compiler.CompileStoreCallback( |
+ receiver, lookup->name(), info, language_mode()); |
+ if (FLAG_runtime_call_stats) return slow_stub(); |
+ return code; |
} else if (accessors->IsAccessorPair()) { |
Handle<Object> setter(Handle<AccessorPair>::cast(accessors)->setter(), |
isolate()); |
@@ -1597,9 +1604,11 @@ Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup, |
if (call_optimization.is_simple_api_call()) { |
if (call_optimization.IsCompatibleReceiver(receiver, holder)) { |
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreCallback); |
- return compiler.CompileStoreCallback(receiver, lookup->name(), |
- call_optimization, |
- lookup->GetAccessorIndex()); |
+ Handle<Code> code = compiler.CompileStoreCallback( |
+ receiver, lookup->name(), call_optimization, |
+ lookup->GetAccessorIndex()); |
+ if (FLAG_runtime_call_stats) return slow_stub(); |
+ return code; |
} |
TRACE_GENERIC_IC(isolate(), "StoreIC", "incompatible receiver"); |
break; |