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

Unified Diff: lib/compiler/implementation/dart_backend/renamer.dart

Issue 10875040: Support customizing API (and hence mock) compiler to minify the output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: lib/compiler/implementation/dart_backend/renamer.dart
diff --git a/lib/compiler/implementation/dart_backend/renamer.dart b/lib/compiler/implementation/dart_backend/renamer.dart
index 959f8d8994c16a1a6b9212754d698a7f79176a5d..d8f71b4cebe703b4283a1fe51a217ea7e3a384c8 100644
--- a/lib/compiler/implementation/dart_backend/renamer.dart
+++ b/lib/compiler/implementation/dart_backend/renamer.dart
@@ -10,7 +10,8 @@ void renamePlaceholders(
Compiler compiler,
PlaceholderCollector placeholderCollector,
Map<Node, String> renames,
- Map<LibraryElement, String> imports) {
+ Map<LibraryElement, String> imports,
+ Generator topLevelGenerator) {
final Map<LibraryElement, Map<String, String>> renamed
= new Map<LibraryElement, Map<String, String>>();
final Set<String> usedTopLevelIdentifiers = new Set<String>();
@@ -18,8 +19,6 @@ void renamePlaceholders(
// names from core library.
usedTopLevelIdentifiers.add('main'); // Never rename anything to 'main'.
- Generator topLevelGenerator =
- true ? conservativeGenerator : new MinifyingGenerator('ABCD').generate;
String generateUniqueName(name) {
String newName = topLevelGenerator(
name, usedTopLevelIdentifiers.contains);

Powered by Google App Engine
This is Rietveld 408576698