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

Side by Side Diff: runtime/lib/object_patch.dart

Issue 12328019: - Improve the message for NoSuchMethodErrors that are (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/vm/bootstrap_natives.h » ('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 patch class Object { 5 patch class Object {
6 6
7 // Helpers used to implement hashCode. If a hashCode is used we remember it 7 // Helpers used to implement hashCode. If a hashCode is used we remember it
8 // using an Expando object. A new hashCode value is calculated using a Random 8 // using an Expando object. A new hashCode value is calculated using a Random
9 // number generator. 9 // number generator.
10 static Expando _hashCodeExp = new Expando("Object.hashCode"); 10 static Expando _hashCodeExp = new Expando("Object.hashCode");
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 return result; 22 return result;
23 } 23 }
24 24
25 /* patch */ String toString() native "Object_toString"; 25 /* patch */ String toString() native "Object_toString";
26 // A statically dispatched version of Object.toString. 26 // A statically dispatched version of Object.toString.
27 static String _toString(obj) native "Object_toString"; 27 static String _toString(obj) native "Object_toString";
28 28
29 _noSuchMethod(bool isMethod, 29 _noSuchMethod(bool isMethod,
30 String memberName, 30 String memberName,
31 int type,
31 List arguments, 32 List arguments,
32 Map<String, dynamic> namedArguments) 33 Map<String, dynamic> namedArguments)
33 native "Object_noSuchMethod"; 34 native "Object_noSuchMethod";
34 35
35 /* patch */ noSuchMethod(InvocationMirror invocation) { 36 /* patch */ noSuchMethod(InvocationMirror invocation) {
36 return _noSuchMethod(invocation.isMethod, 37 return _noSuchMethod(invocation.isMethod,
37 invocation.memberName, 38 invocation.memberName,
39 invocation._type,
38 invocation.positionalArguments, 40 invocation.positionalArguments,
39 invocation.namedArguments); 41 invocation.namedArguments);
40 } 42 }
41 43
42 // Call this function instead of inlining instanceof, thus collecting 44 // Call this function instead of inlining instanceof, thus collecting
43 // type feedback and reducing code size of unoptimized code. 45 // type feedback and reducing code size of unoptimized code.
44 _instanceOf(instantiator, 46 _instanceOf(instantiator,
45 instantiator_type_arguments, 47 instantiator_type_arguments,
46 type, 48 type,
47 bool negate) 49 bool negate)
48 native "Object_instanceOf"; 50 native "Object_instanceOf";
49 51
50 /* patch */ Type get runtimeType native "Object_runtimeType"; 52 /* patch */ Type get runtimeType native "Object_runtimeType";
51 } 53 }
OLDNEW
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698