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

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

Issue 1533383003: Remove instantiator argument in generated code for type tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix typo Created 5 years 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
« 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 // The VM has its own implementation of equals. 7 // The VM has its own implementation of equals.
8 bool operator ==(other) native "Object_equals"; 8 bool operator ==(other) native "Object_equals";
9 9
10 // Helpers used to implement hashCode. If a hashCode is used, we remember it 10 // Helpers used to implement hashCode. If a hashCode is used, we remember it
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 internal.Symbol.getName(invocation.memberName), 46 internal.Symbol.getName(invocation.memberName),
47 invocation._type, 47 invocation._type,
48 invocation.positionalArguments, 48 invocation.positionalArguments,
49 _symbolMapToStringMap(invocation.namedArguments)); 49 _symbolMapToStringMap(invocation.namedArguments));
50 } 50 }
51 51
52 /* patch */ Type get runtimeType native "Object_runtimeType"; 52 /* patch */ Type get runtimeType native "Object_runtimeType";
53 53
54 // Call this function instead of inlining instanceof, thus collecting 54 // Call this function instead of inlining instanceof, thus collecting
55 // type feedback and reducing code size of unoptimized code. 55 // type feedback and reducing code size of unoptimized code.
56 bool _instanceOf(instantiator, 56 bool _instanceOf(instantiator_type_arguments, type, bool negate)
57 instantiator_type_arguments,
58 type,
59 bool negate)
60 native "Object_instanceOf"; 57 native "Object_instanceOf";
61 58
62 bool _instanceOfDouble(bool negate) native "Object_instanceOfDouble"; 59 bool _instanceOfDouble(bool negate) native "Object_instanceOfDouble";
63 bool _instanceOfNum(bool negate) native "Object_instanceOfNum"; 60 bool _instanceOfNum(bool negate) native "Object_instanceOfNum";
64 bool _instanceOfInt(bool negate) native "Object_instanceOfInt"; 61 bool _instanceOfInt(bool negate) native "Object_instanceOfInt";
65 bool _instanceOfSmi(bool negate) native "Object_instanceOfSmi"; 62 bool _instanceOfSmi(bool negate) native "Object_instanceOfSmi";
66 bool _instanceOfString(bool negate) native "Object_instanceOfString"; 63 bool _instanceOfString(bool negate) native "Object_instanceOfString";
67 64
68 // Call this function instead of inlining 'as', thus collecting type 65 // Call this function instead of inlining 'as', thus collecting type
69 // feedback. Returns receiver. 66 // feedback. Returns receiver.
70 _as(instantiator, instantiator_type_arguments, type) native "Object_as"; 67 _as(instantiator_type_arguments, type) native "Object_as";
71 68
72 static _symbolMapToStringMap(Map<Symbol, dynamic> map) { 69 static _symbolMapToStringMap(Map<Symbol, dynamic> map) {
73 var result = new Map<String, dynamic>(); 70 var result = new Map<String, dynamic>();
74 map.forEach((Symbol key, value) { 71 map.forEach((Symbol key, value) {
75 result[internal.Symbol.getName(key)] = value; 72 result[internal.Symbol.getName(key)] = value;
76 }); 73 });
77 return result; 74 return result;
78 } 75 }
79 76
80 _leftShiftWithMask32(count, mask) { 77 _leftShiftWithMask32(count, mask) {
81 return (this << count) & mask; 78 return (this << count) & mask;
82 } 79 }
83 } 80 }
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