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

Side by Side Diff: pkg/compiler/lib/src/native/enqueue.dart

Issue 2370833002: Replace ClosedWorld.backend with ClosedWorld.backendClasses (Closed)
Patch Set: Created 4 years, 2 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 import 'dart:collection' show Queue; 5 import 'dart:collection' show Queue;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/backend_api.dart' show ForeignResolver; 8 import '../common/backend_api.dart' show ForeignResolver;
9 import '../common/registry.dart' show Registry; 9 import '../common/registry.dart' show Registry;
10 import '../common/resolution.dart' show Resolution; 10 import '../common/resolution.dart' show Resolution;
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 } else if (type == coreTypes.numType) { 476 } else if (type == coreTypes.numType) {
477 backend.registerInstantiatedType( 477 backend.registerInstantiatedType(
478 coreTypes.doubleType, world, registry); 478 coreTypes.doubleType, world, registry);
479 backend.registerInstantiatedType(coreTypes.intType, world, registry); 479 backend.registerInstantiatedType(coreTypes.intType, world, registry);
480 } else if (type == coreTypes.stringType) { 480 } else if (type == coreTypes.stringType) {
481 backend.registerInstantiatedType(type, world, registry); 481 backend.registerInstantiatedType(type, world, registry);
482 } else if (type == coreTypes.nullType) { 482 } else if (type == coreTypes.nullType) {
483 backend.registerInstantiatedType(type, world, registry); 483 backend.registerInstantiatedType(type, world, registry);
484 } else if (type == coreTypes.boolType) { 484 } else if (type == coreTypes.boolType) {
485 backend.registerInstantiatedType(type, world, registry); 485 backend.registerInstantiatedType(type, world, registry);
486 } else if (compiler.types 486 } else if (compiler.types.isSubtype(
487 .isSubtype(type, backend.listImplementation.rawType)) { 487 type, backend.backendClasses.listImplementation.rawType)) {
488 backend.registerInstantiatedType(type, world, registry); 488 backend.registerInstantiatedType(type, world, registry);
489 } 489 }
490 // TODO(johnniwinther): Improve spec string precision to handle type 490 // TODO(johnniwinther): Improve spec string precision to handle type
491 // arguments and implements relations that preserve generics. Currently 491 // arguments and implements relations that preserve generics. Currently
492 // we cannot distinguish between `List`, `List<dynamic>`, and 492 // we cannot distinguish between `List`, `List<dynamic>`, and
493 // `List<int>` and take all to mean `List<E>`; in effect not including 493 // `List<int>` and take all to mean `List<E>`; in effect not including
494 // any native subclasses of generic classes. 494 // any native subclasses of generic classes.
495 // TODO(johnniwinther,sra): Find and replace uses of `List` with the 495 // TODO(johnniwinther,sra): Find and replace uses of `List` with the
496 // actual implementation classes such as `JSArray` et al. 496 // actual implementation classes such as `JSArray` et al.
497 enqueueUnusedClassesMatching((ClassElement nativeClass) { 497 enqueueUnusedClassesMatching((ClassElement nativeClass) {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 List<Element> directSubtypes = 673 List<Element> directSubtypes =
674 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassElement>[]); 674 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassElement>[]);
675 directSubtypes.add(cls); 675 directSubtypes.add(cls);
676 } 676 }
677 677
678 void logSummary(log(message)) { 678 void logSummary(log(message)) {
679 log('Compiled ${registeredClasses.length} native classes, ' 679 log('Compiled ${registeredClasses.length} native classes, '
680 '${unusedClasses.length} native classes omitted.'); 680 '${unusedClasses.length} native classes omitted.');
681 } 681 }
682 } 682 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698