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); |
} |
} |
} |