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

Unified Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 1302333006: Support metadata on patches. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove partial renaming Created 5 years, 3 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: pkg/compiler/lib/src/native/behavior.dart
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index edbefd1f85dd32252c5c02e0f556a59cfc1da233..23bf702b96a4a24c35632956dd35d8ce2084d7ec 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -652,7 +652,7 @@ class NativeBehavior {
}
void _overrideWithAnnotations(Element element, Compiler compiler) {
- if (element.metadata.isEmpty) return;
+ if (element.implementation.metadata.isEmpty) return;
DartType lookup(String name) {
Element e = element.buildScope().lookup(name);
@@ -685,10 +685,8 @@ class NativeBehavior {
static _collect(Element element, Compiler compiler, Element annotationClass,
lookup(str)) {
var types = null;
- for (Link<MetadataAnnotation> link = element.metadata;
- !link.isEmpty;
- link = link.tail) {
- MetadataAnnotation annotation = link.head.ensureResolved(compiler);
+ for (MetadataAnnotation annotation in element.implementation.metadata) {
+ annotation.ensureResolved(compiler);
ConstantValue value =
compiler.constants.getConstantValue(annotation.constant);
if (!value.isConstructedObject) continue;

Powered by Google App Engine
This is Rietveld 408576698