| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dart2js.resolution.class_hierarchy; | 5 library dart2js.resolution.class_hierarchy; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/resolution.dart' show Resolution; | 8 import '../common/resolution.dart' show Resolution; |
| 9 import '../core_types.dart' show CoreClasses, CoreTypes; | 9 import '../core_types.dart' show CoreClasses, CoreTypes; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 .createOrderedTypeSet(supertype, cls.interfaces); | 546 .createOrderedTypeSet(supertype, cls.interfaces); |
| 547 } else { | 547 } else { |
| 548 assert(cls == resolution.coreClasses.objectClass); | 548 assert(cls == resolution.coreClasses.objectClass); |
| 549 cls.allSupertypesAndSelf = | 549 cls.allSupertypesAndSelf = |
| 550 new OrderedTypeSet.singleton(cls.computeType(resolution)); | 550 new OrderedTypeSet.singleton(cls.computeType(resolution)); |
| 551 } | 551 } |
| 552 } | 552 } |
| 553 | 553 |
| 554 isBlackListed(DartType type) { | 554 isBlackListed(DartType type) { |
| 555 LibraryElement lib = element.library; | 555 LibraryElement lib = element.library; |
| 556 return !identical(lib, resolution.coreLibrary) && | 556 return !identical(lib, resolution.commonElements.coreLibrary) && |
| 557 !resolution.target.isTargetSpecificLibrary(lib) && | 557 !resolution.target.isTargetSpecificLibrary(lib) && |
| 558 (type.isDynamic || | 558 (type.isDynamic || |
| 559 type == coreTypes.boolType || | 559 type == coreTypes.boolType || |
| 560 type == coreTypes.numType || | 560 type == coreTypes.numType || |
| 561 type == coreTypes.intType || | 561 type == coreTypes.intType || |
| 562 type == coreTypes.doubleType || | 562 type == coreTypes.doubleType || |
| 563 type == coreTypes.stringType || | 563 type == coreTypes.stringType || |
| 564 type == coreTypes.nullType); | 564 type == coreTypes.nullType); |
| 565 } | 565 } |
| 566 } | 566 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 Identifier selector = node.selector.asIdentifier(); | 645 Identifier selector = node.selector.asIdentifier(); |
| 646 var e = prefixElement.lookupLocalMember(selector.source); | 646 var e = prefixElement.lookupLocalMember(selector.source); |
| 647 if (e == null || !e.impliesType) { | 647 if (e == null || !e.impliesType) { |
| 648 reporter.reportErrorMessage(node.selector, | 648 reporter.reportErrorMessage(node.selector, |
| 649 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); | 649 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); |
| 650 return; | 650 return; |
| 651 } | 651 } |
| 652 loadSupertype(e, node); | 652 loadSupertype(e, node); |
| 653 } | 653 } |
| 654 } | 654 } |
| OLD | NEW |