| 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 dart2js.world; | 5 library dart2js.world; |
| 6 | 6 |
| 7 import 'closure.dart' show ClosureClassElement, SynthesizedCallMethodElementX; | 7 import 'closure.dart' show ClosureClassElement, SynthesizedCallMethodElementX; |
| 8 import 'common/backend_api.dart' show BackendClasses; | 8 import 'common/backend_api.dart' show BackendClasses; |
| 9 import 'common.dart'; | 9 import 'common.dart'; |
| 10 import 'constants/constant_system.dart'; | 10 import 'constants/constant_system.dart'; |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 /// relations of known classes. | 1015 /// relations of known classes. |
| 1016 /// | 1016 /// |
| 1017 /// This method is only provided for testing. For queries on classes, use the | 1017 /// This method is only provided for testing. For queries on classes, use the |
| 1018 /// methods defined in [ClosedWorld]. | 1018 /// methods defined in [ClosedWorld]. |
| 1019 ClassSet getClassSet(ClassElement cls) { | 1019 ClassSet getClassSet(ClassElement cls) { |
| 1020 return _classSets[cls.declaration]; | 1020 return _classSets[cls.declaration]; |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 void registerClosureClass(ClosureClassElement cls) { | 1023 void registerClosureClass(ClosureClassElement cls) { |
| 1024 ClassHierarchyNode parentNode = getClassHierarchyNode(cls.superclass); | 1024 ClassHierarchyNode parentNode = getClassHierarchyNode(cls.superclass); |
| 1025 ClassHierarchyNode node = | 1025 ClassHierarchyNode node = _classHierarchyNodes[cls] = |
| 1026 _classHierarchyNodes[cls] = new ClassHierarchyNode(parentNode, cls); | 1026 new ClassHierarchyNode(parentNode, cls, cls.hierarchyDepth); |
| 1027 for (ResolutionInterfaceType type in cls.allSupertypes) { | 1027 for (ResolutionInterfaceType type in cls.allSupertypes) { |
| 1028 ClassSet subtypeSet = getClassSet(type.element); | 1028 ClassSet subtypeSet = getClassSet(type.element); |
| 1029 subtypeSet.addSubtype(node); | 1029 subtypeSet.addSubtype(node); |
| 1030 } | 1030 } |
| 1031 _classSets[cls] = new ClassSet(node); | 1031 _classSets[cls] = new ClassSet(node); |
| 1032 _updateSuperClassHierarchyNodeForClass(node); | 1032 _updateSuperClassHierarchyNodeForClass(node); |
| 1033 node.isDirectlyInstantiated = true; | 1033 node.isDirectlyInstantiated = true; |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 void _updateSuperClassHierarchyNodeForClass(ClassHierarchyNode node) { | 1036 void _updateSuperClassHierarchyNodeForClass(ClassHierarchyNode node) { |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 return getMightBePassedToApply(element.expression); | 1191 return getMightBePassedToApply(element.expression); |
| 1192 } | 1192 } |
| 1193 return functionsThatMightBePassedToApply.contains(element); | 1193 return functionsThatMightBePassedToApply.contains(element); |
| 1194 } | 1194 } |
| 1195 | 1195 |
| 1196 @override | 1196 @override |
| 1197 bool getCurrentlyKnownMightBePassedToApply(Element element) { | 1197 bool getCurrentlyKnownMightBePassedToApply(Element element) { |
| 1198 return getMightBePassedToApply(element); | 1198 return getMightBePassedToApply(element); |
| 1199 } | 1199 } |
| 1200 } | 1200 } |
| OLD | NEW |