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

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
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 16173)
+++ runtime/vm/code_generator.cc (working copy)
@@ -1041,9 +1041,10 @@
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);
+ }
}
ASSERT(target.HasCode());
instructions = Code::Handle(target.CurrentCode()).instructions();
@@ -1128,7 +1129,6 @@
const Error& error = Error::Handle(Compiler::CompileFunction(function));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
- UNREACHABLE();
}
}
const Code& code = Code::Handle(function.CurrentCode());
@@ -1216,7 +1216,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);
@@ -1261,7 +1261,6 @@
// 4. If there was some other error, propagate it.
if (value.IsError()) {
Exceptions::PropagateError(Error::Cast(value));
- UNREACHABLE();
}
// 5. If the value is a closure, invoke it and return the result. If it
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698