| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 Iterable<Element> get fieldSetters; | 162 Iterable<Element> get fieldSetters; |
| 163 | 163 |
| 164 /// Call [f] for all classes with instantiated types. This includes the | 164 /// Call [f] for all classes with instantiated types. This includes the |
| 165 /// directly and abstractly instantiated classes but also classes whose type | 165 /// directly and abstractly instantiated classes but also classes whose type |
| 166 /// arguments are used in live factory constructors. | 166 /// arguments are used in live factory constructors. |
| 167 void forEachInstantiatedClass(f(ClassElement cls, InstantiationInfo info)); | 167 void forEachInstantiatedClass(f(ClassElement cls, InstantiationInfo info)); |
| 168 | 168 |
| 169 /// Returns `true` if [member] is invoked as a setter. | 169 /// Returns `true` if [member] is invoked as a setter. |
| 170 bool hasInvokedSetter(Element member); | 170 bool hasInvokedSetter(Element member); |
| 171 | 171 |
| 172 /// `true` of `Object.runtimeType` is supported. | |
| 173 bool get hasRuntimeTypeSupport; | |
| 174 | |
| 175 /// `true` of use of the `dart:isolate` library is supported. | |
| 176 bool get hasIsolateSupport; | |
| 177 | |
| 178 /// `true` of `Function.apply` is supported. | |
| 179 bool get hasFunctionApplySupport; | |
| 180 | |
| 181 /// The [OpenWorld] being created by this world builder. | 172 /// The [OpenWorld] being created by this world builder. |
| 182 // TODO(johnniwinther): Merge this with [ResolutionWorldBuilder]. | 173 // TODO(johnniwinther): Merge this with [ResolutionWorldBuilder]. |
| 183 OpenWorld get openWorld; | 174 OpenWorld get openWorld; |
| 184 } | 175 } |
| 185 | 176 |
| 186 /// The type and kind of an instantiation registered through | 177 /// The type and kind of an instantiation registered through |
| 187 /// `ResolutionWorldBuilder.registerTypeInstantiation`. | 178 /// `ResolutionWorldBuilder.registerTypeInstantiation`. |
| 188 class Instance { | 179 class Instance { |
| 189 final InterfaceType type; | 180 final InterfaceType type; |
| 190 final Instantiation kind; | 181 final Instantiation kind; |
| (...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 | 1494 |
| 1504 EnumSet<MemberUse> tearOff(); | 1495 EnumSet<MemberUse> tearOff(); |
| 1505 | 1496 |
| 1506 @override | 1497 @override |
| 1507 EnumSet<MemberUse> get _originalUse => MemberUses.NORMAL_ONLY; | 1498 EnumSet<MemberUse> get _originalUse => MemberUses.NORMAL_ONLY; |
| 1508 | 1499 |
| 1509 String toString() => entity.toString(); | 1500 String toString() => entity.toString(); |
| 1510 } | 1501 } |
| 1511 | 1502 |
| 1512 class _GeneralStaticMemberUsage extends _StaticMemberUsage { | 1503 class _GeneralStaticMemberUsage extends _StaticMemberUsage { |
| 1513 _GeneralStaticMemberUsage(Entity entity) : super.internal(entity); | 1504 _GeneralStaticMemberUsage(Entity entity) : super.internal(entity); |
| 1514 | 1505 |
| 1515 EnumSet<MemberUse> tearOff() => normalUse(); | 1506 EnumSet<MemberUse> tearOff() => normalUse(); |
| 1516 } | 1507 } |
| 1517 | 1508 |
| 1518 class _StaticFunctionUsage extends _StaticMemberUsage { | 1509 class _StaticFunctionUsage extends _StaticMemberUsage { |
| 1519 bool hasClosurization = false; | 1510 bool hasClosurization = false; |
| 1520 | 1511 |
| 1521 _StaticFunctionUsage(Entity entity) : super.internal(entity); | 1512 _StaticFunctionUsage(Entity entity) : super.internal(entity); |
| 1522 | 1513 |
| 1523 EnumSet<MemberUse> tearOff() { | 1514 EnumSet<MemberUse> tearOff() { |
| 1524 if (hasClosurization) { | 1515 if (hasClosurization) { |
| 1525 return MemberUses.NONE; | 1516 return MemberUses.NONE; |
| 1526 } | 1517 } |
| 1527 hasNormalUse = hasClosurization = true; | 1518 hasNormalUse = hasClosurization = true; |
| 1528 return _pendingUse.removeAll(MemberUses.ALL); | 1519 return _pendingUse.removeAll(MemberUses.ALL); |
| 1529 } | 1520 } |
| 1530 | 1521 |
| 1531 @override | 1522 @override |
| 1532 EnumSet<MemberUse> get _originalUse => MemberUses.ALL; | 1523 EnumSet<MemberUse> get _originalUse => MemberUses.ALL; |
| 1533 } | 1524 } |
| OLD | NEW |