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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1423063005: VM: Speculative inlining in precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 5 years, 1 month 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/compiler.cc ('k') | runtime/vm/flow_graph_optimizer.h » ('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 8cb1af1d5c9958ffe38a04a8eb146827d1e6e553..e40887bbf0d4aab601a369c47f7874c572ee195c 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -75,6 +75,7 @@ DECLARE_FLAG(bool, lazy_dispatchers);
DECLARE_FLAG(bool, interpret_irregexp);
DECLARE_FLAG(bool, enable_mirrors);
DECLARE_FLAG(bool, link_natives_lazily);
+DECLARE_FLAG(bool, trace_compiler);
bool FLAG_precompilation = false;
static void PrecompilationModeHandler(bool value) {
@@ -916,7 +917,17 @@ Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id,
}
// No deoptimization allowed when 'always_optimize' is set.
- ASSERT(!Compiler::always_optimize());
+ if (Compiler::always_optimize()) {
+ if (FLAG_trace_compiler) {
+ THR_Print(
+ "Retrying compilation %s, suppressing inlining of deopt_id:%" Pd "\n",
+ parsed_function_.function().ToFullyQualifiedCString(), deopt_id);
+ }
+ ASSERT(deopt_id != 0); // longjmp must return non-zero value.
+ Thread::Current()->long_jump_base()->Jump(
+ deopt_id, Object::speculative_inlining_error());
+ }
+
ASSERT(is_optimizing_);
CompilerDeoptInfoWithStub* stub =
new(zone()) CompilerDeoptInfoWithStub(deopt_id,
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698