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

Unified Diff: lib/compiler/implementation/js_backend/backend.dart

Issue 11265020: Minifying renamer for classes, methods and instance variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/js_backend/backend.dart
diff --git a/lib/compiler/implementation/js_backend/backend.dart b/lib/compiler/implementation/js_backend/backend.dart
index a196406cf33fb5ebae21bece76cbd1a90cda1a8c..a5d669361c6b4c10771b36888fa07af07919493e 100644
--- a/lib/compiler/implementation/js_backend/backend.dart
+++ b/lib/compiler/implementation/js_backend/backend.dart
@@ -667,10 +667,8 @@ class JavaScriptBackend extends Backend {
return <CompilerTask>[builder, optimizer, generator, emitter];
}
- JavaScriptBackend(Compiler compiler,
- bool generateSourceMap,
- bool disableEval)
- : namer = new Namer(compiler),
+ JavaScriptBackend(Compiler compiler, bool generateSourceMap, bool disableEval)
+ : namer = determineNamer(compiler),
returnInfo = new Map<Element, ReturnInfo>(),
invalidateAfterCodegen = new List<Element>(),
interceptors = new Interceptors(compiler),
@@ -685,6 +683,12 @@ class JavaScriptBackend extends Backend {
fieldTypes = new FieldTypesRegistry(this);
}
+ static Namer determineNamer(Compiler compiler) {
+ // TODO(erikcorry): Use the MinifyNamer depending on
+ // compiler.enableMinification.
+ return new Namer(compiler);
+ }
+
Element get cyclicThrowHelper {
return compiler.findHelper(const SourceString("throwCyclicInit"));
}

Powered by Google App Engine
This is Rietveld 408576698