| 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;
|
| });
|
| }
|
|
|