Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 2064693003: Remember inside an ICData if it is for a static call or an instance call (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/code_patcher_x64_test.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 8632f7f40c4096d74064d7c34c4f5f14cfb048ec..13159ba5d3b061ba33cd0c52abd4e22610522919 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -1736,17 +1736,19 @@ const ICData* FlowGraphCompiler::GetOrAddInstanceCallICData(
ASSERT(res->deopt_id() == deopt_id);
ASSERT(res->target_name() == target_name.raw());
ASSERT(res->NumArgsTested() == num_args_tested);
+ ASSERT(!res->is_static_call());
return res;
}
const ICData& ic_data = ICData::ZoneHandle(zone(), ICData::New(
parsed_function().function(), target_name,
- arguments_descriptor, deopt_id, num_args_tested));
+ arguments_descriptor, deopt_id, num_args_tested, false));
#if defined(TAG_IC_DATA)
ic_data.set_tag(Instruction::kInstanceCall);
#endif
if (deopt_id_to_ic_data_ != NULL) {
(*deopt_id_to_ic_data_)[deopt_id] = &ic_data;
}
+ ASSERT(!ic_data.is_static_call());
return &ic_data;
}
@@ -1762,11 +1764,12 @@ const ICData* FlowGraphCompiler::GetOrAddStaticCallICData(
ASSERT(res->deopt_id() == deopt_id);
ASSERT(res->target_name() == target.name());
ASSERT(res->NumArgsTested() == num_args_tested);
+ ASSERT(res->is_static_call());
return res;
}
const ICData& ic_data = ICData::ZoneHandle(zone(), ICData::New(
parsed_function().function(), String::Handle(zone(), target.name()),
- arguments_descriptor, deopt_id, num_args_tested));
+ arguments_descriptor, deopt_id, num_args_tested, true));
ic_data.AddTarget(target);
#if defined(TAG_IC_DATA)
ic_data.set_tag(Instruction::kStaticCall);
« no previous file with comments | « runtime/vm/code_patcher_x64_test.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698