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

Unified Diff: runtime/vm/code_generator.cc

Issue 11564029: Implement Function.apply in vm (issue 5670). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 16147)
+++ runtime/vm/code_generator.cc (working copy)
@@ -767,6 +767,7 @@
Error::Handle(Compiler::CompileFunction(target_function));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
siva 2012/12/14 18:30:25 PropagateError already has an UNREACHABLE().
regis 2012/12/14 18:49:49 Done.
+ UNREACHABLE();
}
}
const Code& target_code = Code::Handle(target_function.CurrentCode());
@@ -811,6 +812,7 @@
const Error& error = Error::Handle(Compiler::CompileFunction(function));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
+ UNREACHABLE();
}
}
return function.CurrentCode();
@@ -823,6 +825,7 @@
static void CheckResultError(const Object& result) {
if (result.IsError()) {
Exceptions::PropagateError(Error::Cast(result));
+ UNREACHABLE();
}
}
@@ -847,6 +850,7 @@
const Error& error = Error::Handle(Compiler::CompileFunction(function));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
+ UNREACHABLE();
}
}
arguments.SetReturn(Code::ZoneHandle(function.CurrentCode()));
@@ -1041,9 +1045,11 @@
Instructions& instructions = Instructions::Handle();
if (!target.IsNull()) {
if (!target.HasCode()) {
- const Error& error =
- Error::Handle(Compiler::CompileFunction(target));
- if (!error.IsNull()) Exceptions::PropagateError(error);
+ const Error& error = Error::Handle(Compiler::CompileFunction(target));
+ if (!error.IsNull()) {
+ Exceptions::PropagateError(error);
+ UNREACHABLE();
+ }
}
ASSERT(target.HasCode());
instructions = Code::Handle(target.CurrentCode()).instructions();
@@ -1216,7 +1222,7 @@
dart_arguments.Add(&receiver);
dart_arguments.Add(&call_symbol);
dart_arguments.Add(&arguments);
- dart_arguments.Add(&null_object);
+ dart_arguments.Add(&null_object); // TODO(regis): Provide names.
// If a function "call" with different arguments exists, it will have been
// invoked above, so no need to handle this case here.
Exceptions::ThrowByType(Exceptions::kNoSuchMethod, dart_arguments);
@@ -1538,6 +1544,7 @@
Error::Handle(Compiler::CompileOptimizedFunction(function));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
+ UNREACHABLE();
}
const Code& optimized_code = Code::Handle(function.CurrentCode());
ASSERT(!optimized_code.IsNull());

Powered by Google App Engine
This is Rietveld 408576698