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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1335983004: Add ImportElement and ExportElement (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 3 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/elements/visitor.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index c7b70d2dfcd83b6cf4436a9d0ddf7a5b17a98727..3dbb7908af7ee1cf092fcaad5776543e8593c708 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -1520,17 +1520,15 @@ class JavaScriptBackend extends Backend {
'percentage': percentage.round()});
for (LibraryElement library in compiler.libraryLoader.libraries) {
if (library.isInternalLibrary) continue;
- for (LibraryTag tag in library.tags) {
- Import importTag = tag.asImport();
- if (importTag == null) continue;
- LibraryElement importedLibrary = library.getLibraryFromTag(tag);
+ for (ImportElement import in library.imports) {
+ LibraryElement importedLibrary = import.importedLibrary;
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, kind);
+ compiler.reportInfo(import, kind);
});
}
}
« no previous file with comments | « pkg/compiler/lib/src/elements/visitor.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698