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

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

Issue 57433004: Re-land "Search for main in the exported names of the main library, not in the library itself." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix package1 test. Created 7 years, 1 month 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/elements/modelx.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 56a35e9bc2e87b07d7ae1916a9e52fb591952850..1bb649129ed47366a3669aa841530b3756070598 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -902,6 +902,14 @@ class LibraryElementX extends ElementX implements LibraryElement {
return result;
}
+ Element findExported(String elementName) {
+ for (Link link = exports; !link.isEmpty; link = link.tail) {
+ Element element = link.head;
+ if (element.name == elementName) return element;
+ }
+ return null;
+ }
+
void forEachExport(f(Element element)) {
exports.forEach((Element e) => f(e));
}

Powered by Google App Engine
This is Rietveld 408576698