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

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: Address floitsch's comments 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 fd7b71312d247e3fba28f129f43f448e399db4f1..f7c030aa5f2827cf201fd3332a44f05296acca6a 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