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

Unified Diff: runtime/lib/mirrors.cc

Issue 19200002: Change resolving of instance methods to check early for name mismatch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/lib/invocation_mirror.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
===================================================================
--- runtime/lib/mirrors.cc (revision 25039)
+++ runtime/lib/mirrors.cc (working copy)
@@ -1310,23 +1310,22 @@
Array::CheckedHandle(arguments->NativeArgAt(3));
intptr_t number_of_arguments = positional_args.Length();
-
- const intptr_t num_receiver = 1; // 1 for instance methods
const Array& args =
- Array::Handle(Array::New(number_of_arguments + num_receiver));
+ Array::Handle(Array::New(number_of_arguments + 1)); // Plus receiver.
Object& arg = Object::Handle();
args.SetAt(0, reflectee);
for (int i = 0; i < number_of_arguments; i++) {
arg = positional_args.At(i);
- args.SetAt((i + num_receiver), arg);
+ args.SetAt(i + 1, arg); // Plus receiver.
}
+ ArgumentsDescriptor args_desc(
+ Array::Handle(ArgumentsDescriptor::New(args.Length())));
// TODO(11771): This won't find private members.
const Function& function = Function::Handle(
Resolver::ResolveDynamic(reflectee,
function_name,
- (number_of_arguments + 1),
- Resolver::kIsQualified));
+ args_desc));
return ReflectivelyInvokeDynamicFunction(reflectee,
function,
« no previous file with comments | « runtime/lib/invocation_mirror.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698