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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 2044423003: 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 | « no previous file | runtime/vm/isolate_reload.cc » ('j') | runtime/vm/object.cc » ('J')
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 b403bbf7fa677161f9c64a0e3a899e302e8dd51e..2f14d4e95e4bb84011dfc5b76dfa1980c693507d 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -1717,17 +1717,20 @@ 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));
+ ic_data.SetIsStaticCall(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;
}
@@ -1743,18 +1746,21 @@ 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));
ic_data.AddTarget(target);
+ ic_data.SetIsStaticCall(true);
#if defined(TAG_IC_DATA)
ic_data.set_tag(Instruction::kStaticCall);
#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;
}
« no previous file with comments | « no previous file | runtime/vm/isolate_reload.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698