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

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

Issue 22791002: Add renames in output when using the mirror helper library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added an assert. Created 7 years, 4 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
Index: sdk/lib/_internal/compiler/implementation/mirrors_used.dart
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors_used.dart b/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
index 9c8df9cab5fbe0355c21246f47bedc7b714f2344..144f3950d2abbe5d4f3dff27f6c412c95e5639a5 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
@@ -120,8 +120,11 @@ class MirrorUsageAnalyzerTask extends CompilerTask {
/// the resolver to suppress hints about using new Symbol or
/// MirrorSystem.getName.
bool hasMirrorUsage(Element element) {
- return librariesWithUsage != null
- && librariesWithUsage.contains(element.getLibrary());
+ LibraryElement library = element.getLibrary();
+ // Internal libraries always have implicit mirror usage.
+ return library.isInternalLibrary
+ || (librariesWithUsage != null
+ && librariesWithUsage.contains(library));
}
/// Call-back from the resolver to analyze MirorsUsed annotations. The result

Powered by Google App Engine
This is Rietveld 408576698