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

Unified Diff: sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 29263006: Resolve metadata on library tags (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | tests/lib/mirrors/library_metatarget_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/compiler.dart
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index 802214c2d84f0b7e6c4277d95c02490845e9d6dd..843a0624fa2092933fc0a4c852f00ae732ca9658 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -1060,6 +1060,7 @@ abstract class Compiler implements DiagnosticListener {
// Elements required by enqueueHelpers are global dependencies
// that are not pulled in by a particular element.
backend.enqueueHelpers(enqueuer.resolution, globalDependencies);
+ resolveLibraryMetadata();
processQueue(enqueuer.resolution, main);
enqueuer.resolution.logSummary(log);
@@ -1127,6 +1128,17 @@ abstract class Compiler implements DiagnosticListener {
}
}
+ // Resolves metadata on library elements. This is necessary in order to
+ // resolve metadata classes referenced only from metadata on library tags.
+ // TODO(ahe): Figure out how to do this lazily.
+ void resolveLibraryMetadata() {
+ for (LibraryElement library in libraries.values) {
+ for (MetadataAnnotation metadata in library.metadata) {
+ metadata.ensureResolved(this);
+ }
+ }
+ }
+
void processQueue(Enqueuer world, Element main) {
world.nativeEnqueuer.processNativeClasses(libraries.values);
if (main != null) {
« no previous file with comments | « no previous file | tests/lib/mirrors/library_metatarget_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698