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

Unified Diff: runtime/vm/code_generator.cc

Issue 12315087: Hook up simulator (if needed) when calling Dart code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/code_descriptors_test.cc ('k') | runtime/vm/code_generator_test.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 18992)
+++ runtime/vm/code_generator.cc (working copy)
@@ -1109,20 +1109,16 @@
// A non-closure object was invoked as a closure, so call the "call" method
// on it.
-// Arg0: non-closure object.
-// Arg1: arguments descriptor.
-// Arg2: arguments array, including non-closure object.
-DEFINE_RUNTIME_ENTRY(InvokeNonClosure, 3) {
+// Arg0: arguments descriptor.
+// Arg1: arguments array, including non-closure object.
+DEFINE_RUNTIME_ENTRY(InvokeNonClosure, 2) {
ASSERT(arguments.ArgCount() ==
kInvokeNonClosureRuntimeEntry.argument_count());
- const Instance& instance = Instance::CheckedHandle(arguments.ArgAt(0));
- const Array& args_descriptor = Array::CheckedHandle(arguments.ArgAt(1));
- const Array& function_args = Array::CheckedHandle(arguments.ArgAt(2));
+ const Array& args_descriptor = Array::CheckedHandle(arguments.ArgAt(0));
+ const Array& function_args = Array::CheckedHandle(arguments.ArgAt(1));
const Object& result = Object::Handle(
- DartEntry::InvokeClosure(instance,
- function_args,
- args_descriptor));
+ DartEntry::InvokeClosure(function_args, args_descriptor));
CheckResultError(result);
arguments.SetReturn(result);
}
@@ -1154,7 +1150,7 @@
// 2. Invoke the getter.
const Array& args = Array::Handle(Array::New(kNumArguments));
args.SetAt(0, receiver);
- const Object& value = Object::Handle(DartEntry::InvokeDynamic(getter, args));
+ const Object& value = Object::Handle(DartEntry::InvokeFunction(getter, args));
// 3. If the getter threw an exception, treat it as no such method.
if (value.IsUnhandledException()) return false;
@@ -1166,9 +1162,7 @@
Instance& instance = Instance::Handle();
instance ^= value.raw();
arguments.SetAt(0, instance);
- *result = DartEntry::InvokeClosure(instance,
- arguments,
- arguments_descriptor);
+ *result = DartEntry::InvokeClosure(arguments, arguments_descriptor);
CheckResultError(*result);
return true;
}
« no previous file with comments | « runtime/vm/code_descriptors_test.cc ('k') | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698