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

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

Issue 78223004: Diagnose missing @MirrorsUsed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 7 years 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
Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 17c53c0f1f027e8c8b16046eb821f7c143247933..2540ac0e409123543c52c386b171514aeecea1f2 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1326,8 +1326,12 @@ class JavaScriptBackend extends Backend {
if (importTag == null) continue;
LibraryElement importedLibrary = library.getLibraryFromTag(tag);
if (importedLibrary != compiler.mirrorsLibrary) continue;
+ MessageKind kind =
+ compiler.mirrorUsageAnalyzerTask.hasMirrorUsage(library)
+ ? MessageKind.MIRROR_IMPORT
+ : MessageKind.MIRROR_IMPORT_NO_USAGE;
compiler.withCurrentElement(library, () {
- compiler.reportInfo(importTag, MessageKind.MIRROR_IMPORT);
+ compiler.reportInfo(importTag, kind);
});
}
}
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/warnings.dart » ('j') | dart/sdk/lib/mirrors/mirrors.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698