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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 2737303003: Allow dispatch to use a range of Class-ids in tests (Closed)
Patch Set: Created 3 years, 9 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
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 0046c038270c00aab22e7a4178a1c9e1460ee897..a881c809d07bbb11b1894c10ff769164d0cefd6b 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -3165,7 +3165,7 @@ void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
compiler->EmitPolymorphicInstanceCall(
ic_data(), instance_call()->ArgumentCount(),
instance_call()->argument_names(), deopt_id(),
- instance_call()->token_pos(), locs(), complete());
+ instance_call()->token_pos(), locs(), complete(), total_ic_count());
}
#endif
@@ -3236,6 +3236,16 @@ Definition* PolymorphicInstanceCallInstr::Canonicalize(FlowGraph* flow_graph) {
}
+void PolymorphicInstanceCallInstr::InitializeIcCount() {
+ const intptr_t num_checks = ic_data().NumberOfChecks();
+ intptr_t total = 0;
+ for (intptr_t i = 0; i < num_checks; i++) {
+ total += ic_data().GetCountAt(i);
+ }
+ total_ic_count_ = total;
+}
+
+
Definition* StaticCallInstr::Canonicalize(FlowGraph* flow_graph) {
if (!FLAG_precompiled_mode) {
return this;

Powered by Google App Engine
This is Rietveld 408576698