| 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 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1400 ResolutionRegistry registry = visitor.registry; | 1400 ResolutionRegistry registry = visitor.registry; |
| 1401 node.accept(visitor); | 1401 node.accept(visitor); |
| 1402 // TODO(johnniwinther): Avoid passing the [TreeElements] to | 1402 // TODO(johnniwinther): Avoid passing the [TreeElements] to |
| 1403 // [compileMetadata]. | 1403 // [compileMetadata]. |
| 1404 annotation.value = | 1404 annotation.value = |
| 1405 constantCompiler.compileMetadata(annotation, node, registry.mapping); | 1405 constantCompiler.compileMetadata(annotation, node, registry.mapping); |
| 1406 // TODO(johnniwinther): Register the relation between the annotation | 1406 // TODO(johnniwinther): Register the relation between the annotation |
| 1407 // and the annotated element instead. This will allow the backend to | 1407 // and the annotated element instead. This will allow the backend to |
| 1408 // retrieve the backend constant and only register metadata on the | 1408 // retrieve the backend constant and only register metadata on the |
| 1409 // elements for which it is needed. (Issue 17732). | 1409 // elements for which it is needed. (Issue 17732). |
| 1410 registry.registerMetadataConstant(annotation.value, annotatedElement); | 1410 registry.registerMetadataConstant(annotation, annotatedElement); |
| 1411 annotation.resolutionState = STATE_DONE; | 1411 annotation.resolutionState = STATE_DONE; |
| 1412 })); | 1412 })); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 error(Spannable node, MessageKind kind, [arguments = const {}]) { | 1415 error(Spannable node, MessageKind kind, [arguments = const {}]) { |
| 1416 // TODO(ahe): Make non-fatal. | 1416 // TODO(ahe): Make non-fatal. |
| 1417 compiler.reportFatalError(node, kind, arguments); | 1417 compiler.reportFatalError(node, kind, arguments); |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 Link<MetadataAnnotation> resolveMetadata(Element element, | 1420 Link<MetadataAnnotation> resolveMetadata(Element element, |
| (...skipping 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4953 } | 4953 } |
| 4954 | 4954 |
| 4955 /// The result for the resolution of the `assert` method. | 4955 /// The result for the resolution of the `assert` method. |
| 4956 class AssertResult implements ResolutionResult { | 4956 class AssertResult implements ResolutionResult { |
| 4957 const AssertResult(); | 4957 const AssertResult(); |
| 4958 | 4958 |
| 4959 Element get element => null; | 4959 Element get element => null; |
| 4960 | 4960 |
| 4961 String toString() => 'AssertResult()'; | 4961 String toString() => 'AssertResult()'; |
| 4962 } | 4962 } |
| OLD | NEW |