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

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

Issue 11694003: In unoptimized code use call for instanceof instead of inlined checks. This allows us to collect ty… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 12 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
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 18 matching lines...) Expand all
29 Map<String, dynamic> namedArguments) 29 Map<String, dynamic> namedArguments)
30 native "Object_noSuchMethod"; 30 native "Object_noSuchMethod";
31 31
32 /* patch */ noSuchMethod(InvocationMirror invocation) { 32 /* patch */ noSuchMethod(InvocationMirror invocation) {
33 return _noSuchMethod(invocation.isMethod, 33 return _noSuchMethod(invocation.isMethod,
34 invocation.memberName, 34 invocation.memberName,
35 invocation.positionalArguments, 35 invocation.positionalArguments,
36 invocation.namedArguments); 36 invocation.namedArguments);
37 } 37 }
38 38
39 _instanceOf(instantiator,
regis 2012/12/28 19:46:49 Add a comment about the usefulness of this call.
srdjan 2013/01/02 20:38:46 Done.
40 instantiator_type_arguments,
41 type,
42 bool negate)
43 native "Object_instanceOf";
44
39 /* patch */ Type get runtimeType native "Object_runtimeType"; 45 /* patch */ Type get runtimeType native "Object_runtimeType";
40 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698