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

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

Issue 2982733002: Use entities in most of MirrorsData (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/kernel/kernel_strategy.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/kernel/kernel_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698