| 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<Local> get localFunctions; | 10 Iterable<Local> get localFunctions; |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 nativeBasicData, | 945 nativeBasicData, |
| 946 nativeDataBuilder, | 946 nativeDataBuilder, |
| 947 interceptorDataBuilder, | 947 interceptorDataBuilder, |
| 948 backendUsageBuilder, | 948 backendUsageBuilder, |
| 949 selectorConstraintsStrategy); | 949 selectorConstraintsStrategy); |
| 950 | 950 |
| 951 @override | 951 @override |
| 952 ClosedWorld closeWorld() { | 952 ClosedWorld closeWorld() { |
| 953 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses = | 953 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses = |
| 954 populateHierarchyNodes(); | 954 populateHierarchyNodes(); |
| 955 _classHierarchyNodes.keys.toList().forEach(_ensureClassSet); |
| 955 _closed = true; | 956 _closed = true; |
| 957 assert( |
| 958 _classHierarchyNodes.length == _classSets.length, |
| 959 "ClassHierarchyNode/ClassSet mismatch: " |
| 960 "$_classHierarchyNodes vs $_classSets"); |
| 956 return _closedWorldCache = new KernelClosedWorld( | 961 return _closedWorldCache = new KernelClosedWorld( |
| 957 commonElements: _commonElements, | 962 commonElements: _commonElements, |
| 958 nativeData: _nativeDataBuilder.close(), | 963 nativeData: _nativeDataBuilder.close(), |
| 959 interceptorData: _interceptorDataBuilder.close(), | 964 interceptorData: _interceptorDataBuilder.close(), |
| 960 backendUsage: _backendUsageBuilder.close(), | 965 backendUsage: _backendUsageBuilder.close(), |
| 961 constantSystem: _constantSystem, | 966 constantSystem: _constantSystem, |
| 962 resolutionWorldBuilder: this, | 967 resolutionWorldBuilder: this, |
| 963 functionSet: _allFunctions.close(), | 968 functionSet: _allFunctions.close(), |
| 964 allTypedefs: _allTypedefs, | 969 allTypedefs: _allTypedefs, |
| 965 mixinUses: _mixinUses, | 970 mixinUses: _mixinUses, |
| 966 typesImplementedBySubclasses: typesImplementedBySubclasses, | 971 typesImplementedBySubclasses: typesImplementedBySubclasses, |
| 967 classHierarchyNodes: _classHierarchyNodes, | 972 classHierarchyNodes: _classHierarchyNodes, |
| 968 classSets: _classSets); | 973 classSets: _classSets); |
| 969 } | 974 } |
| 970 | 975 |
| 971 @override | 976 @override |
| 972 void registerClass(ClassEntity cls) { | 977 void registerClass(ClassEntity cls) { |
| 973 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass'); | 978 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass'); |
| 974 } | 979 } |
| 975 } | 980 } |
| OLD | NEW |