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

Unified Diff: runtime/vm/compiler.cc

Issue 22389004: Allows compiler bailout to handle errors of any type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 25967)
+++ runtime/vm/compiler.cc (working copy)
@@ -548,21 +548,21 @@
done = true;
} else {
// We bailed out.
- const Error& bailout_error = Error::Handle(
- isolate->object_store()->sticky_error());
- ASSERT(bailout_error.IsLanguageError());
- const LanguageError& le = LanguageError::CheckedHandle(
- isolate->object_store()->sticky_error());
- const String& msg = String::Handle(le.message());
- if (msg.Equals("Branch offset overflow")) {
+ if (isolate->object_store()->sticky_error() ==
+ Object::branch_offset_error().raw()) {
+ // Compilation failed due to an out of range branch offset in the
+ // assembler. We try again (done = false) with far branches enabled.
done = false;
ASSERT(!use_far_branches);
use_far_branches = true;
} else {
- // If not for a branch offset overflow, we only bail out from
- // generating ssa code.
+ // If the error isn't due to an out of range branch offset, we don't
+ // try again (done = true), and indicate that we did not finish
+ // compiling (is_compiled = false).
if (FLAG_trace_bailout) {
+ const Error& bailout_error = Error::Handle(
+ isolate->object_store()->sticky_error());
OS::Print("%s\n", bailout_error.ToErrorCString());
}
done = true;
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698