| OLD | NEW |
| 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 library universe; | 5 library universe; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import '../cache_strategy.dart'; | 9 import '../cache_strategy.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 this.cacheStrategy = cacheStrategy, | 494 this.cacheStrategy = cacheStrategy, |
| 495 alreadyPopulated = cacheStrategy.newSet() { | 495 alreadyPopulated = cacheStrategy.newSet() { |
| 496 _allFunctions = new FunctionSetBuilder(); | 496 _allFunctions = new FunctionSetBuilder(); |
| 497 } | 497 } |
| 498 | 498 |
| 499 Iterable<ClassElement> get processedClasses => _processedClasses.keys | 499 Iterable<ClassElement> get processedClasses => _processedClasses.keys |
| 500 .where((cls) => _processedClasses[cls].isInstantiated); | 500 .where((cls) => _processedClasses[cls].isInstantiated); |
| 501 | 501 |
| 502 CommonElements get commonElements => _resolution.commonElements; | 502 CommonElements get commonElements => _resolution.commonElements; |
| 503 | 503 |
| 504 CoreTypes get coreTypes => _resolution.coreTypes; | |
| 505 | |
| 506 ClosedWorld get closedWorldForTesting { | 504 ClosedWorld get closedWorldForTesting { |
| 507 if (!_closed) { | 505 if (!_closed) { |
| 508 throw new SpannableAssertionFailure( | 506 throw new SpannableAssertionFailure( |
| 509 NO_LOCATION_SPANNABLE, "The world builder has not yet been closed."); | 507 NO_LOCATION_SPANNABLE, "The world builder has not yet been closed."); |
| 510 } | 508 } |
| 511 return _closedWorldCache; | 509 return _closedWorldCache; |
| 512 } | 510 } |
| 513 | 511 |
| 514 /// All directly instantiated classes, that is, classes with a generative | 512 /// All directly instantiated classes, that is, classes with a generative |
| 515 /// constructor that has been called directly and not only through a | 513 /// constructor that has been called directly and not only through a |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 // Use the [:seenClasses:] set to include non-instantiated | 1089 // Use the [:seenClasses:] set to include non-instantiated |
| 1092 // classes: if the superclass of these classes require RTI, then | 1090 // classes: if the superclass of these classes require RTI, then |
| 1093 // they also need RTI, so that a constructor passes the type | 1091 // they also need RTI, so that a constructor passes the type |
| 1094 // variables to the super constructor. | 1092 // variables to the super constructor. |
| 1095 forEachInstantiatedClass(addSubtypes); | 1093 forEachInstantiatedClass(addSubtypes); |
| 1096 | 1094 |
| 1097 _closed = true; | 1095 _closed = true; |
| 1098 return _closedWorldCache = new ClosedWorldImpl( | 1096 return _closedWorldCache = new ClosedWorldImpl( |
| 1099 backend: _backend, | 1097 backend: _backend, |
| 1100 commonElements: commonElements, | 1098 commonElements: commonElements, |
| 1101 coreTypes: coreTypes, | |
| 1102 resolverWorld: this, | 1099 resolverWorld: this, |
| 1103 functionSetBuilder: _allFunctions, | 1100 functionSetBuilder: _allFunctions, |
| 1104 allTypedefs: _allTypedefs, | 1101 allTypedefs: _allTypedefs, |
| 1105 mixinUses: _mixinUses, | 1102 mixinUses: _mixinUses, |
| 1106 typesImplementedBySubclasses: typesImplementedBySubclasses, | 1103 typesImplementedBySubclasses: typesImplementedBySubclasses, |
| 1107 classHierarchyNodes: _classHierarchyNodes, | 1104 classHierarchyNodes: _classHierarchyNodes, |
| 1108 classSets: _classSets); | 1105 classSets: _classSets); |
| 1109 } | 1106 } |
| 1110 | 1107 |
| 1111 void registerMixinUse( | 1108 void registerMixinUse( |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1759 if (hasClosurization) { | 1756 if (hasClosurization) { |
| 1760 return MemberUses.NONE; | 1757 return MemberUses.NONE; |
| 1761 } | 1758 } |
| 1762 hasNormalUse = hasClosurization = true; | 1759 hasNormalUse = hasClosurization = true; |
| 1763 return _pendingUse.removeAll(MemberUses.ALL_STATIC); | 1760 return _pendingUse.removeAll(MemberUses.ALL_STATIC); |
| 1764 } | 1761 } |
| 1765 | 1762 |
| 1766 @override | 1763 @override |
| 1767 EnumSet<MemberUse> get _originalUse => MemberUses.ALL_STATIC; | 1764 EnumSet<MemberUse> get _originalUse => MemberUses.ALL_STATIC; |
| 1768 } | 1765 } |
| OLD | NEW |