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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 2376893003: Emit switchable instance calls when we don't know the complete set of receiver classes for a call s… (Closed)
Patch Set: Created 4 years, 3 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/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.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 4e0d2c773a9e85398e0f0a3c5988db5f30b6b7c4..7d8e18a60625c07261cd8232473ee2c46d6c7184 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -1915,20 +1915,8 @@ void FlowGraphCompiler::EmitPolymorphicInstanceCall(
deopt_id, token_pos, locs, true);
assembler()->Bind(&ok);
} else {
- // Instead of deoptimizing, do a megamorphic call when no matching
- // cid found.
- Label ok;
- MegamorphicSlowPath* slow_path =
- new MegamorphicSlowPath(ic_data, argument_count, deopt_id,
- token_pos, locs, CurrentTryIndex());
- AddSlowPathCode(slow_path);
- EmitTestAndCall(ic_data, argument_count, argument_names,
- slow_path->entry_label(), // No cid match.
- &ok, // Found cid.
- deopt_id, token_pos, locs, false);
-
- assembler()->Bind(slow_path->exit_label());
- assembler()->Bind(&ok);
+ EmitSwitchableInstanceCall(ic_data, argument_count,
+ deopt_id, token_pos, locs);
}
}
}
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698