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

Unified Diff: runtime/vm/compiler.cc

Issue 1420173006: Move resolving of natives to a late stage (during code emission). That eliminates unnecessary nativ… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: r 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/code_generator_test.cc ('k') | runtime/vm/intermediate_language.h » ('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 0422cf3062225d5d95e6afc8864364ea6deb5e3a..43bbcbafdf6989103e9953a9832403cccc626754 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -852,7 +852,6 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline,
THR_Print("%s\n", error.ToErrorCString());
}
done = true;
- ASSERT(optimized);
}
// Clear the error if it was not a real error, but just a bailout.
@@ -1091,8 +1090,14 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
}
function.SetIsOptimizable(false);
return Error::null();
+ } else {
+ // Encountered error.
+ Error& error = Error::Handle();
+ // We got an error during compilation.
+ error = isolate->object_store()->sticky_error();
+ isolate->object_store()->clear_sticky_error();
+ return error.raw();
}
- UNREACHABLE();
}
per_compile_timer.Stop();
« no previous file with comments | « runtime/vm/code_generator_test.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698