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

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

Issue 11453032: Reapply class/method/field minification (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback Created 8 years 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/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index a566b0f42434941147d8aa240c8bc6625e968a11..902414dbf26f44ef90e0fa8b66118dac84af81b7 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -700,10 +700,8 @@ class JavaScriptBackend extends Backend {
final RuntimeTypeInformation rti;
- 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),
@@ -724,6 +722,12 @@ class JavaScriptBackend extends Backend {
fieldTypes = new FieldTypesRegistry(this);
}
+ static Namer determineNamer(Compiler compiler) {
+ return compiler.enableMinification ?
+ new MinifyNamer(compiler) :
+ new Namer(compiler);
+ }
+
bool isInterceptorClass(Element element) {
if (element == null) return false;
return interceptedClasses.containsKey(element);

Powered by Google App Engine
This is Rietveld 408576698