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

Side by Side Diff: lib/compiler/implementation/js_backend/emitter_no_eval.dart

Issue 11307009: Revert "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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of js_backend; 5 part of js_backend;
6 6
7 class CodeEmitterNoEvalTask extends CodeEmitterTask { 7 class CodeEmitterNoEvalTask extends CodeEmitterTask {
8 CodeEmitterNoEvalTask(Compiler compiler, 8 CodeEmitterNoEvalTask(Compiler compiler,
9 Namer namer, 9 Namer namer,
10 bool generateSourceMap) 10 bool generateSourceMap)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // d needs both a getter and a setter. Then we produce: 76 // d needs both a getter and a setter. Then we produce:
77 // - a constructor (directly into the given [buffer]): 77 // - a constructor (directly into the given [buffer]):
78 // function A(b, c, d) { this.b = b, this.c = c, this.d = d; } 78 // function A(b, c, d) { this.b = b, this.c = c, this.d = d; }
79 // - getters and setters (stored in the [explicitGettersSetters] list): 79 // - getters and setters (stored in the [explicitGettersSetters] list):
80 // get$c : function() { return this.c; } 80 // get$c : function() { return this.c; }
81 // get$d : function() { return this.d; } 81 // get$d : function() { return this.d; }
82 // set$d : function(x) { this.d = x; } 82 // set$d : function(x) { this.d = x; }
83 List<String> fields = <String>[]; 83 List<String> fields = <String>[];
84 visitClassFields(classElement, (Element member, 84 visitClassFields(classElement, (Element member,
85 String name, 85 String name,
86 String accessorName,
87 bool needsGetter, 86 bool needsGetter,
88 bool needsSetter, 87 bool needsSetter,
89 bool needsCheckedSetter) { 88 bool needsCheckedSetter) {
90 fields.add(name); 89 fields.add(name);
91 }); 90 });
92 91
93 List<String> argumentNames = fields; 92 List<String> argumentNames = fields;
94 if (fields.length < ($z - $a)) { 93 if (fields.length < ($z - $a)) {
95 argumentNames = new List<String>(fields.length); 94 argumentNames = new List<String>(fields.length);
96 for (int i = 0; i < fields.length; i++) { 95 for (int i = 0; i < fields.length; i++) {
(...skipping 20 matching lines...) Expand all
117 emitComma() { 116 emitComma() {
118 if (!omitLeadingComma) { 117 if (!omitLeadingComma) {
119 buffer.add(",\n "); 118 buffer.add(",\n ");
120 } else { 119 } else {
121 omitLeadingComma = false; 120 omitLeadingComma = false;
122 } 121 }
123 } 122 }
124 123
125 visitClassFields(classElement, (Element member, 124 visitClassFields(classElement, (Element member,
126 String name, 125 String name,
127 String accessorName,
128 bool needsGetter, 126 bool needsGetter,
129 bool needsSetter, 127 bool needsSetter,
130 bool needsCheckedSetter) { 128 bool needsCheckedSetter) {
131 if (needsGetter) { 129 if (needsGetter) {
132 emitComma(); 130 emitComma();
133 generateGetter(member, name, accessorName, buffer); 131 generateGetter(member, name, buffer);
134 } 132 }
135 if (needsSetter) { 133 if (needsSetter) {
136 emitComma(); 134 emitComma();
137 generateSetter(member, name, accessorName, buffer); 135 generateSetter(member, name, buffer);
138 } 136 }
139 if (needsCheckedSetter) { 137 if (needsCheckedSetter) {
140 assert(!needsSetter); 138 assert(!needsSetter);
141 emitComma(); 139 emitComma();
142 generateCheckedSetter(member, name, accessorName, buffer); 140 generateCheckedSetter(member, name, buffer);
143 } 141 }
144 }); 142 });
145 } 143 }
146 } 144 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/js_backend/emitter.dart ('k') | lib/compiler/implementation/js_backend/js_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698