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

Unified Diff: pkg/compiler/lib/src/kernel/kernel.dart

Issue 2467493003: Compute NativeBehavior for native methods and fields. (Closed)
Patch Set: Updated cf. comments Created 4 years, 1 month 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
« no previous file with comments | « pkg/compiler/lib/src/kernel/constant_visitor.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/kernel.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel.dart b/pkg/compiler/lib/src/kernel/kernel.dart
index 35ff9ea49490cf6ea642f34166ab4706265ddc42..b4ff25a039f6f74eab0a206b9e67cb2605c02845 100644
--- a/pkg/compiler/lib/src/kernel/kernel.dart
+++ b/pkg/compiler/lib/src/kernel/kernel.dart
@@ -27,10 +27,12 @@ import '../elements/elements.dart'
ImportElement,
LibraryElement,
LocalFunctionElement,
+ MetadataAnnotation,
MixinApplicationElement,
TypeVariableElement;
import '../elements/modelx.dart' show ErroneousFieldElementX;
import '../tree/tree.dart' show FunctionExpression, Node;
+import 'constant_visitor.dart';
import 'kernel_visitor.dart' show IrFunction, KernelVisitor;
typedef void WorkAction();
@@ -217,6 +219,12 @@ class Kernel {
classNode.implementedTypes.add(interface);
}
});
+ addWork(cls.declaration, () {
+ for (MetadataAnnotation metadata in cls.declaration.metadata) {
+ classNode.addAnnotation(
+ const ConstantVisitor().visit(metadata.constant, this));
+ }
+ });
return classNode;
});
}
@@ -391,6 +399,12 @@ class Kernel {
return true;
});
});
+ addWork(function.declaration, () {
+ for (MetadataAnnotation metadata in function.declaration.metadata) {
+ member.addAnnotation(
+ const ConstantVisitor().visit(metadata.constant, this));
+ }
+ });
return member;
});
}
@@ -452,6 +466,12 @@ class Kernel {
..parent = fieldNode;
}
});
+ addWork(field.declaration, () {
+ for (MetadataAnnotation metadata in field.declaration.metadata) {
+ fieldNode.addAnnotation(
+ const ConstantVisitor().visit(metadata.constant, this));
+ }
+ });
return fieldNode;
});
}
« no previous file with comments | « pkg/compiler/lib/src/kernel/constant_visitor.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698