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