OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 part of world_builder; | 5 part of world_builder; |
6 | 6 |
7 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld { | 7 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld { |
8 /// Set of all local functions in the program. Used by the mirror tracking | 8 /// Set of all local functions in the program. Used by the mirror tracking |
9 /// system to find all live closure instances. | 9 /// system to find all live closure instances. |
10 Iterable<LocalFunctionElement> get localFunctions; | 10 Iterable<LocalFunctionElement> get localFunctions; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 new Set<MethodElement>(); | 329 new Set<MethodElement>(); |
330 | 330 |
331 final SelectorConstraintsStrategy selectorConstraintsStrategy; | 331 final SelectorConstraintsStrategy selectorConstraintsStrategy; |
332 | 332 |
333 bool hasRuntimeTypeSupport = false; | 333 bool hasRuntimeTypeSupport = false; |
334 bool hasIsolateSupport = false; | 334 bool hasIsolateSupport = false; |
335 bool hasFunctionApplySupport = false; | 335 bool hasFunctionApplySupport = false; |
336 | 336 |
337 /// Used for testing the new more precise computation of instantiated types | 337 /// Used for testing the new more precise computation of instantiated types |
338 /// and classes. | 338 /// and classes. |
339 bool useInstantiationMap = false; | 339 static bool useInstantiationMap = false; |
340 | 340 |
341 final JavaScriptBackend _backend; | 341 final JavaScriptBackend _backend; |
342 final Resolution _resolution; | 342 final Resolution _resolution; |
343 bool _closed = false; | 343 bool _closed = false; |
344 ClosedWorld _closedWorldCache; | 344 ClosedWorld _closedWorldCache; |
345 FunctionSetBuilder _allFunctions; | 345 FunctionSetBuilder _allFunctions; |
346 | 346 |
347 final Set<TypedefElement> _allTypedefs = new Set<TypedefElement>(); | 347 final Set<TypedefElement> _allTypedefs = new Set<TypedefElement>(); |
348 | 348 |
349 final Map<ClassElement, Set<MixinApplicationElement>> _mixinUses = | 349 final Map<ClassElement, Set<MixinApplicationElement>> _mixinUses = |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 @override | 949 @override |
950 bool isMemberUsed(MemberEntity member) { | 950 bool isMemberUsed(MemberEntity member) { |
951 if (member.isInstanceMember) { | 951 if (member.isInstanceMember) { |
952 _MemberUsage usage = _instanceMemberUsage[member]; | 952 _MemberUsage usage = _instanceMemberUsage[member]; |
953 if (usage != null && usage.hasUse) return true; | 953 if (usage != null && usage.hasUse) return true; |
954 } | 954 } |
955 _StaticMemberUsage usage = _staticMemberUsage[member]; | 955 _StaticMemberUsage usage = _staticMemberUsage[member]; |
956 return usage != null && usage.hasUse; | 956 return usage != null && usage.hasUse; |
957 } | 957 } |
958 } | 958 } |
OLD | NEW |