| 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 Set<Node> get superUses; | 9 Set<Node> get superUses; |
| 10 | 10 |
| (...skipping 3913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3924 } | 3924 } |
| 3925 return node.source; | 3925 return node.source; |
| 3926 } | 3926 } |
| 3927 | 3927 |
| 3928 visitNodeList(NodeList node) { | 3928 visitNodeList(NodeList node) { |
| 3929 for (Link<Node> link = node.nodes; !link.isEmpty; link = link.tail) { | 3929 for (Link<Node> link = node.nodes; !link.isEmpty; link = link.tail) { |
| 3930 SourceString name = visit(link.head); | 3930 SourceString name = visit(link.head); |
| 3931 VariableElement element = | 3931 VariableElement element = |
| 3932 new VariableElementX(name, variables, kind, link.head); | 3932 new VariableElementX(name, variables, kind, link.head); |
| 3933 resolver.defineElement(link.head, element); | 3933 resolver.defineElement(link.head, element); |
| 3934 if (definitions.modifiers.isConst()) { |
| 3935 compiler.enqueuer.resolution.addPostProcessAction(element, () { |
| 3936 compiler.constantHandler.compileVariable(element, isConst: true); |
| 3937 }); |
| 3938 } |
| 3934 } | 3939 } |
| 3935 } | 3940 } |
| 3936 } | 3941 } |
| 3937 | 3942 |
| 3938 /** | 3943 /** |
| 3939 * [SignatureResolver] resolves function signatures. | 3944 * [SignatureResolver] resolves function signatures. |
| 3940 */ | 3945 */ |
| 3941 class SignatureResolver extends CommonResolverVisitor<Element> { | 3946 class SignatureResolver extends CommonResolverVisitor<Element> { |
| 3942 final Element enclosingElement; | 3947 final Element enclosingElement; |
| 3943 final bool defaultValuesAllowed; | 3948 final bool defaultValuesAllowed; |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4322 return e; | 4327 return e; |
| 4323 } | 4328 } |
| 4324 | 4329 |
| 4325 /// Assumed to be called by [resolveRedirectingFactory]. | 4330 /// Assumed to be called by [resolveRedirectingFactory]. |
| 4326 Element visitReturn(Return node) { | 4331 Element visitReturn(Return node) { |
| 4327 Node expression = node.expression; | 4332 Node expression = node.expression; |
| 4328 return finishConstructorReference(visit(expression), | 4333 return finishConstructorReference(visit(expression), |
| 4329 expression, expression); | 4334 expression, expression); |
| 4330 } | 4335 } |
| 4331 } | 4336 } |
| OLD | NEW |