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

Unified Diff: runtime/vm/compiler.cc

Issue 1568613007: Don't suppress compile-time errors when inlining. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index be9c996a8ee88a12f439c6bb3fbe4041a12f7223..bd896adbc0529d4032a7d0f361bae1c49936de80 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -1336,8 +1336,7 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
CompileParsedFunctionHelper helper(parsed_function, optimized, osr_id);
const bool success = helper.Compile(pipeline);
if (!success) {
- if (optimized) {
- ASSERT(!Compiler::always_optimize()); // Optimized is the only code.
+ if (optimized && !Compiler::always_optimize()) {
// Optimizer bailed out. Disable optimizations and never try again.
if (trace_compiler) {
THR_Print("--> disabling optimizations for '%s'\n",
@@ -1354,6 +1353,8 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
// We got an error during compilation.
error = isolate->object_store()->sticky_error();
isolate->object_store()->clear_sticky_error();
+ ASSERT(error.IsLanguageError() &&
+ LanguageError::Cast(error).kind() != Report::kBailout);
return error.raw();
}
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698