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

Side by Side Diff: runtime/lib/invocation_mirror.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/exceptions.h" 9 #include "vm/exceptions.h"
10 #include "vm/native_entry.h" 10 #include "vm/native_entry.h"
(...skipping 17 matching lines...) Expand all
28 Object& arg = Object::Handle(); 28 Object& arg = Object::Handle();
29 for (int i = 1; i < num_arguments; i++) { 29 for (int i = 1; i < num_arguments; i++) {
30 arg = fun_arguments.At(i); 30 arg = fun_arguments.At(i);
31 invoke_arguments.SetAt(i, arg); 31 invoke_arguments.SetAt(i, arg);
32 } 32 }
33 // Resolve dynamic function given by name. 33 // Resolve dynamic function given by name.
34 const ArgumentsDescriptor args_desc(fun_args_desc); 34 const ArgumentsDescriptor args_desc(fun_args_desc);
35 const Function& function = Function::Handle( 35 const Function& function = Function::Handle(
36 Resolver::ResolveDynamic(receiver, 36 Resolver::ResolveDynamic(receiver,
37 fun_name, 37 fun_name,
38 args_desc.Count(), 38 args_desc));
39 args_desc.NamedCount()));
40 Object& result = Object::Handle(); 39 Object& result = Object::Handle();
41 if (function.IsNull()) { 40 if (function.IsNull()) {
42 result = DartEntry::InvokeNoSuchMethod(receiver, 41 result = DartEntry::InvokeNoSuchMethod(receiver,
43 fun_name, 42 fun_name,
44 invoke_arguments, 43 invoke_arguments,
45 fun_args_desc); 44 fun_args_desc);
46 } else { 45 } else {
47 result = DartEntry::InvokeFunction(function, 46 result = DartEntry::InvokeFunction(function,
48 invoke_arguments, 47 invoke_arguments,
49 fun_args_desc); 48 fun_args_desc);
50 } 49 }
51 if (result.IsError()) { 50 if (result.IsError()) {
52 Exceptions::PropagateError(Error::Cast(result)); 51 Exceptions::PropagateError(Error::Cast(result));
53 } 52 }
54 return result.raw(); 53 return result.raw();
55 } 54 }
56 55
57 } // namespace dart 56 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698