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

Side by Side Diff: pkg/compiler/lib/src/js_backend/codegen/glue.dart

Issue 1161683002: dart2js cps: 'is' checks on types with type arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library code_generator_dependencies; 5 library code_generator_dependencies;
6 6
7 import '../js_backend.dart'; 7 import '../js_backend.dart';
8 import '../../dart2jslib.dart'; 8 import '../../dart2jslib.dart';
9 import '../../js_emitter/js_emitter.dart'; 9 import '../../js_emitter/js_emitter.dart';
10 import '../../js/js.dart' as js; 10 import '../../js/js.dart' as js;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 FunctionElement getTypeArgumentByIndex() { 166 FunctionElement getTypeArgumentByIndex() {
167 return _backend.getGetTypeArgumentByIndex(); 167 return _backend.getGetTypeArgumentByIndex();
168 } 168 }
169 169
170 FunctionElement getAddRuntimeTypeInformation() { 170 FunctionElement getAddRuntimeTypeInformation() {
171 return _backend.getSetRuntimeTypeInfo(); 171 return _backend.getSetRuntimeTypeInfo();
172 } 172 }
173 173
174 FunctionElement getCheckSubtype() {
175 return _backend.getCheckSubtype();
176 }
177
174 js.Expression getRuntimeTypeName(ClassElement cls) { 178 js.Expression getRuntimeTypeName(ClassElement cls) {
175 return js.string(_namer.runtimeTypeName(cls)); 179 return js.string(_namer.runtimeTypeName(cls));
176 } 180 }
177 181
178 int getTypeVariableIndex(TypeVariableType variable) { 182 int getTypeVariableIndex(TypeVariableType variable) {
179 return RuntimeTypes.getTypeVariableIndex(variable.element); 183 return RuntimeTypes.getTypeVariableIndex(variable.element);
180 } 184 }
181 185
182 bool needsSubstitutionForTypeVariableAccess(ClassElement cls) { 186 bool needsSubstitutionForTypeVariableAccess(ClassElement cls) {
183 ClassWorld classWorld = _compiler.world; 187 ClassWorld classWorld = _compiler.world;
(...skipping 17 matching lines...) Expand all
201 205
202 void registerIsCheck(DartType type, Registry registry) { 206 void registerIsCheck(DartType type, Registry registry) {
203 _enqueuer.registerIsCheck(type, registry); 207 _enqueuer.registerIsCheck(type, registry);
204 _backend.registerIsCheckForCodegen(type, _enqueuer, registry); 208 _backend.registerIsCheckForCodegen(type, _enqueuer, registry);
205 } 209 }
206 210
207 String getTypeTestTag(DartType type) { 211 String getTypeTestTag(DartType type) {
208 return _backend.namer.operatorIsType(type); 212 return _backend.namer.operatorIsType(type);
209 } 213 }
210 214
215 String getTypeSubstitutionTag(ClassElement element) {
216 return _backend.namer.substitutionName(element);
217 }
218
211 bool operatorEqHandlesNullArgument(FunctionElement element) { 219 bool operatorEqHandlesNullArgument(FunctionElement element) {
212 return _backend.operatorEqHandlesNullArgument(element); 220 return _backend.operatorEqHandlesNullArgument(element);
213 } 221 }
222
223 bool hasStrictSubtype(ClassElement element) {
224 return _compiler.world.hasAnyStrictSubtype(element);
225 }
214 } 226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698