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

Unified Diff: runtime/vm/compiler.cc

Issue 1107663002: Fix http://dartbug.com/23290 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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/compiler.h ('k') | runtime/vm/coverage.cc » ('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 45386)
+++ runtime/vm/compiler.cc (working copy)
@@ -972,7 +972,11 @@
// Restore unoptimized code if needed.
if (optimized) {
- Compiler::EnsureUnoptimizedCode(Thread::Current(), function);
+ const Error& error = Error::Handle(
+ zone, Compiler::EnsureUnoptimizedCode(Thread::Current(), function));
+ if (!error.IsNull()) {
+ return error.raw();
+ }
}
ParsedFunction* parsed_function = new(zone) ParsedFunction(
@@ -1057,10 +1061,10 @@
}
-void Compiler::EnsureUnoptimizedCode(Thread* thread,
+RawError* Compiler::EnsureUnoptimizedCode(Thread* thread,
const Function& function) {
if (function.unoptimized_code() != Object::null()) {
- return;
+ return Error::null();
}
Code& original_code = Code::ZoneHandle(thread->zone());
if (function.HasCode()) {
@@ -1071,7 +1075,7 @@
const Error& error = Error::Handle(
CompileFunctionHelper(pipeline, function, false, Isolate::kNoDeoptId));
if (!error.IsNull()) {
- Exceptions::PropagateError(error);
+ return error.raw();
}
// Since CompileFunctionHelper replaces the current code, re-attach the
// the original code if the function was already compiled.
@@ -1083,6 +1087,7 @@
if (FLAG_trace_compiler) {
ISL_Print("Ensure unoptimized code for %s\n", function.ToCString());
}
+ return Error::null();
}
« no previous file with comments | « runtime/vm/compiler.h ('k') | runtime/vm/coverage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698