Index: pkg/compiler/lib/src/kernel/env.dart |
diff --git a/pkg/compiler/lib/src/kernel/env.dart b/pkg/compiler/lib/src/kernel/env.dart |
index 2c31f77596a72cd20eaa76689ca41c6a5fa87658..f861770f36e2dc0830b0849295ccdf76cbf47873 100644 |
--- a/pkg/compiler/lib/src/kernel/env.dart |
+++ b/pkg/compiler/lib/src/kernel/env.dart |
@@ -146,6 +146,21 @@ class LibraryEnv { |
} |
} |
+class LibraryData { |
+ final ir.Library library; |
+ Iterable<ConstantValue> _metadata; |
+ |
+ LibraryData(this.library); |
+ |
+ Iterable<ConstantValue> getMetadata(KernelToElementMapBase elementMap) { |
+ return _metadata ??= elementMap.getMetadata(library.annotations); |
+ } |
+ |
+ LibraryData copy() { |
+ return new LibraryData(library); |
+ } |
+} |
+ |
/// Environment for fast lookup of class members. |
class ClassEnv { |
final ir.Class cls; |