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 Element get currentElement; | 8 Element get currentElement; |
9 Setlet<Node> get superUses; | 9 Setlet<Node> get superUses; |
10 | 10 |
(...skipping 2692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2703 mapping.setPotentiallyMutated(target, node); | 2703 mapping.setPotentiallyMutated(target, node); |
2704 if (enclosingElement != target.enclosingElement) { | 2704 if (enclosingElement != target.enclosingElement) { |
2705 mapping.registerPotentiallyMutatedInClosure(target, node); | 2705 mapping.registerPotentiallyMutatedInClosure(target, node); |
2706 } | 2706 } |
2707 for (Node scope in promotionScope) { | 2707 for (Node scope in promotionScope) { |
2708 mapping.registerPotentiallyMutatedIn(scope, target, node); | 2708 mapping.registerPotentiallyMutatedIn(scope, target, node); |
2709 } | 2709 } |
2710 } | 2710 } |
2711 } | 2711 } |
2712 | 2712 |
2713 visit(node.argumentsNode); | 2713 resolveArguments(node.argumentsNode); |
2714 | 2714 |
2715 // TODO(ngeoffray): Check if the target can be assigned. | 2715 // TODO(ngeoffray): Check if the target can be assigned. |
2716 // TODO(ngeoffray): Warn if target is null and the send is | 2716 // TODO(ngeoffray): Warn if target is null and the send is |
2717 // unqualified. | 2717 // unqualified. |
2718 | 2718 |
2719 Selector selector = mapping.getSelector(node); | 2719 Selector selector = mapping.getSelector(node); |
2720 if (isComplex) { | 2720 if (isComplex) { |
2721 Selector getterSelector; | 2721 Selector getterSelector; |
2722 if (selector.isSetter()) { | 2722 if (selector.isSetter()) { |
2723 getterSelector = new Selector.getterFrom(selector); | 2723 getterSelector = new Selector.getterFrom(selector); |
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4675 return finishConstructorReference(visit(expression), | 4675 return finishConstructorReference(visit(expression), |
4676 expression, expression); | 4676 expression, expression); |
4677 } | 4677 } |
4678 } | 4678 } |
4679 | 4679 |
4680 /// Looks up [name] in [scope] and unwraps the result. | 4680 /// Looks up [name] in [scope] and unwraps the result. |
4681 Element lookupInScope(Compiler compiler, Node node, | 4681 Element lookupInScope(Compiler compiler, Node node, |
4682 Scope scope, String name) { | 4682 Scope scope, String name) { |
4683 return Elements.unwrap(scope.lookup(name), compiler, node); | 4683 return Elements.unwrap(scope.lookup(name), compiler, node); |
4684 } | 4684 } |
OLD | NEW |