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

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

Issue 11747010: Process handled exports correctly. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 11 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/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/library_loader.dart
diff --git a/sdk/lib/_internal/compiler/implementation/library_loader.dart b/sdk/lib/_internal/compiler/implementation/library_loader.dart
index d7b538e6acba61e10ae1732c6fe69eb7db276732..ccf513c2c692b6f7c01aa47a30b54db2c852f713 100644
--- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -528,6 +528,16 @@ class LibraryDependencyNode {
pendingExportSet.addAll(library.getNonPrivateElementsInScope());
}
+ void registerHandledExports(LibraryElement exportedLibraryElement,
+ CombinatorFilter filter) {
+ assert(invariant(library, exportedLibraryElement.exportsHandled));
+ for (Element exportedElement in exportedLibraryElement.exports) {
+ if (!filter.exclude(exportedElement)) {
+ pendingExportSet.add(exportedElement);
+ }
+ }
+ }
+
/**
* Registers the compute export scope with the node library.
*/
@@ -685,12 +695,14 @@ class LibraryDependencyHandler {
LibraryElement loadedLibrary) {
if (tag is Export) {
// [loadedLibrary] is exported by [library].
+ LibraryDependencyNode exportingNode = nodeMap[library];
if (loadedLibrary.exportsHandled) {
// Export scope already computed on [loadedLibrary].
+ var combinatorFilter = new CombinatorFilter.fromTag(tag);
+ exportingNode.registerHandledExports(loadedLibrary, combinatorFilter);
return;
}
LibraryDependencyNode exportedNode = nodeMap[loadedLibrary];
- LibraryDependencyNode exportingNode = nodeMap[library];
assert(invariant(loadedLibrary, exportedNode != null,
message: "$loadedLibrary has not been registered"));
assert(invariant(library, exportingNode != null,
« no previous file with comments | « no previous file | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698