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

Unified Diff: lib/src/compiler.dart

Issue 1337993004: fixes #315, order of libraries in the HTML file (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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 | « no previous file | test/codegen/expect/sunflower/sunflower.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler.dart
diff --git a/lib/src/compiler.dart b/lib/src/compiler.dart
index 1723d4c5fb58fb83a8a694452cf0c64c0b5c666c..51b79dca25ab2fdc76c139e6faf349e572f25069 100644
--- a/lib/src/compiler.dart
+++ b/lib/src/compiler.dart
@@ -152,8 +152,8 @@ class BatchCompiler extends AbstractCompiler {
// TODO(jmesserly): in incremental mode, we can skip the transitive
// compile of imports/exports.
_compileLibrary(_dartCore); // implicit dart:core dependency
- library.importedLibraries.forEach(_compileLibrary);
- library.exportedLibraries.forEach(_compileLibrary);
+ for (var import in library.imports) _compileLibrary(import.importedLibrary);
+ for (var export in library.exports) _compileLibrary(export.exportedLibrary);
var unitElements = [library.definingCompilationUnit]..addAll(library.parts);
var units = <CompilationUnit>[];
@@ -269,8 +269,9 @@ class BatchCompiler extends AbstractCompiler {
var uri = lib.source.uri;
if (!loaded.add(uri)) return;
_collectLibraries(_dartCore, loaded);
- for (var l in lib.importedLibraries) _collectLibraries(l, loaded);
- for (var l in lib.exportedLibraries) _collectLibraries(l, loaded);
+
+ for (var l in lib.imports) _collectLibraries(l.importedLibrary, loaded);
+ for (var l in lib.exports) _collectLibraries(l.exportedLibrary, loaded);
// Move the item to the end of the list.
loaded.remove(uri);
loaded.add(uri);
« no previous file with comments | « no previous file | test/codegen/expect/sunflower/sunflower.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698