Chromium Code Reviews| 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 739 } | 739 } |
| 740 | 740 |
| 741 TreeElements resolveField(FieldElementX element) { | 741 TreeElements resolveField(FieldElementX element) { |
| 742 VariableDefinitions tree = element.parseNode(compiler); | 742 VariableDefinitions tree = element.parseNode(compiler); |
| 743 if(element.modifiers.isStatic && element.isTopLevel) { | 743 if(element.modifiers.isStatic && element.isTopLevel) { |
| 744 error(element.modifiers.getStatic(), | 744 error(element.modifiers.getStatic(), |
| 745 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC); | 745 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC); |
| 746 } | 746 } |
| 747 ResolverVisitor visitor = visitorFor(element); | 747 ResolverVisitor visitor = visitorFor(element); |
| 748 ResolutionRegistry registry = visitor.registry; | 748 ResolutionRegistry registry = visitor.registry; |
| 749 // TODO(johnnywinther): Maybe remove this when placeholderCollector migrates | |
|
Johnni Winther
2014/08/15 07:49:19
johnnywinther -> johnniwinther
sigurdm
2014/08/15 13:06:27
Done.
| |
| 750 // to the backend ast. | |
| 751 registry.defineElement(tree.definitions.nodes.head, element); | |
| 749 // TODO(johnniwinther): Share the resolved type between all variables | 752 // TODO(johnniwinther): Share the resolved type between all variables |
| 750 // declared in the same declaration. | 753 // declared in the same declaration. |
| 751 if (tree.type != null) { | 754 if (tree.type != null) { |
| 752 element.variables.type = visitor.resolveTypeAnnotation(tree.type); | 755 element.variables.type = visitor.resolveTypeAnnotation(tree.type); |
| 753 } else { | 756 } else { |
| 754 element.variables.type = const DynamicType(); | 757 element.variables.type = const DynamicType(); |
| 755 } | 758 } |
| 756 | 759 |
| 757 Expression initializer = element.initializer; | 760 Expression initializer = element.initializer; |
| 758 Modifiers modifiers = element.modifiers; | 761 Modifiers modifiers = element.modifiers; |
| (...skipping 4181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4940 } | 4943 } |
| 4941 | 4944 |
| 4942 /// The result for the resolution of the `assert` method. | 4945 /// The result for the resolution of the `assert` method. |
| 4943 class AssertResult implements ResolutionResult { | 4946 class AssertResult implements ResolutionResult { |
| 4944 const AssertResult(); | 4947 const AssertResult(); |
| 4945 | 4948 |
| 4946 Element get element => null; | 4949 Element get element => null; |
| 4947 | 4950 |
| 4948 String toString() => 'AssertResult()'; | 4951 String toString() => 'AssertResult()'; |
| 4949 } | 4952 } |
| OLD | NEW |