Commit e52020c7 authored by jochen's avatar jochen Committed by Commit bot

Disable Api call optimizations for runtime call stats

Otherwise, we don't account for callbacks from optimized code anymore.

R=verwaest@chromium.org,cbruni@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2459573002
Cr-Commit-Position: refs/heads/master@{#40645}
parent f2b60e9a
......@@ -8854,6 +8854,7 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall(
bool HOptimizedGraphBuilder::TryInlineApiFunctionCall(Call* expr,
HValue* receiver) {
if (FLAG_runtime_call_stats) return false;
Handle<JSFunction> function = expr->target();
int argc = expr->arguments()->length();
SmallMapList receiver_maps;
......@@ -8866,6 +8867,7 @@ bool HOptimizedGraphBuilder::TryInlineApiMethodCall(
Call* expr,
HValue* receiver,
SmallMapList* receiver_maps) {
if (FLAG_runtime_call_stats) return false;
Handle<JSFunction> function = expr->target();
int argc = expr->arguments()->length();
return TryInlineApiCall(function, receiver, receiver_maps, argc, expr->id(),
......@@ -8875,6 +8877,7 @@ bool HOptimizedGraphBuilder::TryInlineApiMethodCall(
bool HOptimizedGraphBuilder::TryInlineApiGetter(Handle<Object> function,
Handle<Map> receiver_map,
BailoutId ast_id) {
if (FLAG_runtime_call_stats) return false;
SmallMapList receiver_maps(1, zone());
receiver_maps.Add(receiver_map, zone());
return TryInlineApiCall(function,
......@@ -8898,6 +8901,7 @@ bool HOptimizedGraphBuilder::TryInlineApiCall(
Handle<Object> function, HValue* receiver, SmallMapList* receiver_maps,
int argc, BailoutId ast_id, ApiCallType call_type,
TailCallMode syntactic_tail_call_mode) {
if (FLAG_runtime_call_stats) return false;
if (function->IsJSFunction() &&
Handle<JSFunction>::cast(function)->context()->native_context() !=
top_info()->closure()->context()->native_context()) {
......
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