| 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 part of resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 AnalyzableElement get analyzedElement; | 8 AnalyzableElement get analyzedElement; |
| 9 Iterable<Node> get superUses; | 9 Iterable<Node> get superUses; |
| 10 | 10 |
| (...skipping 2770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2781 type = target.computeType(compiler); | 2781 type = target.computeType(compiler); |
| 2782 } | 2782 } |
| 2783 registry.registerTypeLiteral(node, type); | 2783 registry.registerTypeLiteral(node, type); |
| 2784 | 2784 |
| 2785 // Don't try to make constants of calls to type literals. | 2785 // Don't try to make constants of calls to type literals. |
| 2786 if (!node.isCall) { | 2786 if (!node.isCall) { |
| 2787 analyzeConstantDeferred(node); | 2787 analyzeConstantDeferred(node); |
| 2788 } else { | 2788 } else { |
| 2789 // The node itself is not a constant but we register the selector (the | 2789 // The node itself is not a constant but we register the selector (the |
| 2790 // identifier that refers to the class/typedef) as a constant. | 2790 // identifier that refers to the class/typedef) as a constant. |
| 2791 if (node.receiver != null) { |
| 2792 // This is a hack for the case of prefix.Type, we need to store |
| 2793 // the element on the selector, so [analyzeConstant] can build |
| 2794 // the type literal from the selector. |
| 2795 registry.useElement(node.selector, target); |
| 2796 } |
| 2791 analyzeConstantDeferred(node.selector); | 2797 analyzeConstantDeferred(node.selector); |
| 2792 } | 2798 } |
| 2793 } | 2799 } |
| 2794 if (isPotentiallyMutableTarget(target)) { | 2800 if (isPotentiallyMutableTarget(target)) { |
| 2795 if (enclosingElement != target.enclosingElement) { | 2801 if (enclosingElement != target.enclosingElement) { |
| 2796 for (Node scope in promotionScope) { | 2802 for (Node scope in promotionScope) { |
| 2797 registry.setAccessedByClosureIn(scope, target, node); | 2803 registry.setAccessedByClosureIn(scope, target, node); |
| 2798 } | 2804 } |
| 2799 } | 2805 } |
| 2800 } | 2806 } |
| (...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4976 } | 4982 } |
| 4977 | 4983 |
| 4978 /// The result for the resolution of the `assert` method. | 4984 /// The result for the resolution of the `assert` method. |
| 4979 class AssertResult implements ResolutionResult { | 4985 class AssertResult implements ResolutionResult { |
| 4980 const AssertResult(); | 4986 const AssertResult(); |
| 4981 | 4987 |
| 4982 Element get element => null; | 4988 Element get element => null; |
| 4983 | 4989 |
| 4984 String toString() => 'AssertResult()'; | 4990 String toString() => 'AssertResult()'; |
| 4985 } | 4991 } |
| OLD | NEW |