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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1513883002: Polymorphic calls in precompilation invoke megamorphic calls when tests fail (instead of deoptimizi… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: g Created 5 years 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 5280252ef8e98a2c725435b21837c5ed1e728cd2..8c6fa8e9a378a3a576f63ab48a6201f1eb78b36d 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -56,7 +56,7 @@ DECLARE_FLAG(bool, disassemble);
DECLARE_FLAG(bool, disassemble_optimized);
DECLARE_FLAG(bool, emit_edge_counters);
DECLARE_FLAG(bool, fields_may_be_reset);
-DECLARE_FLAG(bool, guess_other_cid);
+DECLARE_FLAG(bool, guess_icdata_cid);
DECLARE_FLAG(bool, ic_range_profiling);
DECLARE_FLAG(bool, intrinsify);
DECLARE_FLAG(bool, load_deferred_eagerly);
@@ -98,7 +98,6 @@ static void PrecompilationModeHandler(bool value) {
FLAG_load_deferred_eagerly = true;
FLAG_deoptimize_alot = false; // Used in some tests.
FLAG_deoptimize_every = 0; // Used in some tests.
- FLAG_guess_other_cid = true;
Compiler::set_always_optimize(true);
// Triggers assert if we try to recompile (e.g., because of deferred
// loading, deoptimization, ...). Noopt mode simulates behavior
@@ -1773,16 +1772,17 @@ void FlowGraphCompiler::EmitPolymorphicInstanceCall(
} else {
// Instead of deoptimizing, do a megamorphic call when no matching
// cid found.
- Label megamorphic, ok;
+ 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,
- &megamorphic, // No cid match.
- &ok, // Found cid.
+ slow_path->entry_label(), // No cid match.
+ &ok, // Found cid.
deopt_id, token_pos, locs);
- // Fall through if last test is match.
- assembler()->Jump(&ok);
- assembler()->Bind(&megamorphic);
- EmitMegamorphicInstanceCall(ic_data, argument_count, deopt_id,
- token_pos, locs);
+
+ assembler()->Bind(slow_path->exit_label());
assembler()->Bind(&ok);
}
}
« 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