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

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

Issue 476583003: Allow dart2dart to output one file per library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Insert library-names in generateds libraries. Fix bug of previous upload Created 6 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/deferred_load.dart
diff --git a/sdk/lib/_internal/compiler/implementation/deferred_load.dart b/sdk/lib/_internal/compiler/implementation/deferred_load.dart
index 0c0aa7b28dbbf217e2c51e069da34f64c49b8ad6..8972da10fd8bf697be3f6d545c40c14411cd4362 100644
--- a/sdk/lib/_internal/compiler/implementation/deferred_load.dart
+++ b/sdk/lib/_internal/compiler/implementation/deferred_load.dart
@@ -36,7 +36,7 @@ import 'elements/elements.dart' show
AstElement;
import 'util/util.dart' show
- Link;
+ Link, makeUnique;
import 'util/setlet.dart' show
Setlet;
@@ -527,22 +527,6 @@ class DeferredLoadTask extends CompilerTask {
void _assignNamesToOutputUnits(Set<OutputUnit> allOutputUnits) {
Set<String> usedImportNames = new Set<String>();
- // Returns suggestedName if it is not in usedNames. Otherwise concatenates
- // the smallest number that makes it not appear in usedNames.
- // Adds the result to usedNames.
- String makeUnique(String suggestedName, Set<String> usedNames) {
- String result = suggestedName;
- if (usedNames.contains(suggestedName)) {
- int counter = 0;
- while (usedNames.contains(result)) {
- counter++;
- result = "$suggestedName$counter";
- }
- }
- usedNames.add(result);
- return result;
- }
-
// Finds the first argument to the [DeferredLibrary] annotation
void computeImportDeferName(Import import) {
String result;

Powered by Google App Engine
This is Rietveld 408576698