| 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 | 7 import 'closure.dart' show |
| 8 SynthesizedCallMethodElementX; | 8 SynthesizedCallMethodElementX; |
| 9 import 'common.dart'; | 9 import 'common.dart'; |
| 10 import 'common/backend_api.dart' show | 10 import 'common/backend_api.dart' show |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 if (directlyInstantiated) { | 646 if (directlyInstantiated) { |
| 647 node.isDirectlyInstantiated = true; | 647 node.isDirectlyInstantiated = true; |
| 648 } | 648 } |
| 649 } | 649 } |
| 650 | 650 |
| 651 void populate() { | 651 void populate() { |
| 652 /// Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated` | 652 /// Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated` |
| 653 /// properties of the [ClassHierarchyNode] for [cls]. | 653 /// properties of the [ClassHierarchyNode] for [cls]. |
| 654 | 654 |
| 655 void addSubtypes(ClassElement cls) { | 655 void addSubtypes(ClassElement cls) { |
| 656 if (compiler.hasIncrementalSupport && !alreadyPopulated.add(cls)) { | 656 if (compiler.options.hasIncrementalSupport && |
| 657 !alreadyPopulated.add(cls)) { |
| 657 return; | 658 return; |
| 658 } | 659 } |
| 659 assert(cls.isDeclaration); | 660 assert(cls.isDeclaration); |
| 660 if (!cls.isResolved) { | 661 if (!cls.isResolved) { |
| 661 reporter.internalError(cls, 'Class "${cls.name}" is not resolved.'); | 662 reporter.internalError(cls, 'Class "${cls.name}" is not resolved.'); |
| 662 } | 663 } |
| 663 | 664 |
| 664 _updateClassHierarchyNodeForClass(cls, directlyInstantiated: true); | 665 _updateClassHierarchyNodeForClass(cls, directlyInstantiated: true); |
| 665 | 666 |
| 666 // Walk through the superclasses, and record the types | 667 // Walk through the superclasses, and record the types |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 // method of function classes that were generated for function | 835 // method of function classes that were generated for function |
| 835 // expressions. In such a case, we have to look at the original | 836 // expressions. In such a case, we have to look at the original |
| 836 // function expressions's element. | 837 // function expressions's element. |
| 837 // TODO(herhut): Generate classes for function expressions earlier. | 838 // TODO(herhut): Generate classes for function expressions earlier. |
| 838 if (element is SynthesizedCallMethodElementX) { | 839 if (element is SynthesizedCallMethodElementX) { |
| 839 return getMightBePassedToApply(element.expression); | 840 return getMightBePassedToApply(element.expression); |
| 840 } | 841 } |
| 841 return functionsThatMightBePassedToApply.contains(element); | 842 return functionsThatMightBePassedToApply.contains(element); |
| 842 } | 843 } |
| 843 | 844 |
| 844 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; | 845 bool get hasClosedWorldAssumption => !compiler.options.hasIncrementalSupport; |
| 845 } | 846 } |
| OLD | NEW |