Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/signatures.dart

Issue 155703004: Support parameter metadata. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/resolution/signatures.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/signatures.dart b/sdk/lib/_internal/compiler/implementation/resolution/signatures.dart
index c2aab5636b881440fd0f0044c2a785b4bc398c67..d6b1db6a73bc5b247f9b2dec3331079dd5fef042 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/signatures.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/signatures.dart
@@ -63,6 +63,19 @@ class SignatureResolver extends CommonResolverVisitor<Element> {
}
currentDefinitions = node;
Element element = definition.accept(this);
+ if (currentDefinitions.metadata != null) {
+ // TODO(johnniwinther): Unify handling of metadata on locals/formals.
+ for (Link<Node> link = currentDefinitions.metadata.nodes;
+ !link.isEmpty;
+ link = link.tail) {
+ ParameterMetadataAnnotation metadata =
+ new ParameterMetadataAnnotation(link.head);
+ element.addMetadata(metadata);
+ addDeferredAction(element, () {
+ metadata.ensureResolved(compiler);
+ });
+ }
+ }
currentDefinitions = null;
return element;
}

Powered by Google App Engine
This is Rietveld 408576698