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

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

Issue 1301363002: dart2js cps: Generate fast checks for 'is String' and 'is bool'. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 '../../common/registry.dart' show 8 import '../../common/registry.dart' show
9 Registry; 9 Registry;
10 import '../../compiler.dart' show 10 import '../../compiler.dart' show
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 bool operatorEqHandlesNullArgument(FunctionElement element) { 245 bool operatorEqHandlesNullArgument(FunctionElement element) {
246 return _backend.operatorEqHandlesNullArgument(element); 246 return _backend.operatorEqHandlesNullArgument(element);
247 } 247 }
248 248
249 bool hasStrictSubtype(ClassElement element) { 249 bool hasStrictSubtype(ClassElement element) {
250 return _compiler.world.hasAnyStrictSubtype(element); 250 return _compiler.world.hasAnyStrictSubtype(element);
251 } 251 }
252 252
253 ClassElement get jsExtendableArrayClass => _backend.jsExtendableArrayClass; 253 ClassElement get jsExtendableArrayClass => _backend.jsExtendableArrayClass;
254 ClassElement get jsMutableArrayClass => _backend.jsMutableArrayClass; 254 ClassElement get jsMutableArrayClass => _backend.jsMutableArrayClass;
255
256 bool isStringClass(ClassElement classElement) =>
257 classElement == _backend.jsStringClass ||
258 classElement == _compiler.stringClass;
259
260 bool isBoolClass(ClassElement classElement) =>
261 classElement == _backend.jsBoolClass ||
262 classElement == _compiler.boolClass;
255 } 263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698