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

Side by Side Diff: pkg/compiler/lib/src/js_backend/field_naming_mixin.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 abstract class _MinifiedFieldNamer implements Namer { 7 abstract class _MinifiedFieldNamer implements Namer {
8 _FieldNamingRegistry get fieldRegistry; 8 _FieldNamingRegistry get fieldRegistry;
9 9
10 // Returns a minimal name for the field that is globally unique along 10 // Returns a minimal name for the field that is globally unique along
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 } 140 }
141 141
142 cls.forEachInstanceField((cls, field) => result.add(field)); 142 cls.forEachInstanceField((cls, field) => result.add(field));
143 143
144 registry.scopes[cls] = result; 144 registry.scopes[cls] = result;
145 return result; 145 return result;
146 } 146 }
147 147
148 factory _FieldNamingScope.forBox(Local box, _FieldNamingRegistry registry) { 148 factory _FieldNamingScope.forBox(Local box, _FieldNamingRegistry registry) {
149 return registry.scopes.putIfAbsent( 149 return registry.scopes
150 box, () => new _BoxFieldNamingScope(box, registry)); 150 .putIfAbsent(box, () => new _BoxFieldNamingScope(box, registry));
151 } 151 }
152 152
153 _FieldNamingScope.rootScope(this.container, this.registry) 153 _FieldNamingScope.rootScope(this.container, this.registry)
154 : superScope = null, 154 : superScope = null,
155 _fieldNameCounter = 0; 155 _fieldNameCounter = 0;
156 156
157 _FieldNamingScope.inherit(this.container, this.superScope, this.registry) { 157 _FieldNamingScope.inherit(this.container, this.superScope, this.registry) {
158 _fieldNameCounter = superScope.inheritanceBasedFieldNameCounter; 158 _fieldNameCounter = superScope.inheritanceBasedFieldNameCounter;
159 } 159 }
160 160
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 : super.rootScope(box, registry); 227 : super.rootScope(box, registry);
228 228
229 @override 229 @override
230 bool containsField(_) => true; 230 bool containsField(_) => true;
231 231
232 jsAst.Name operator [](Element field) { 232 jsAst.Name operator [](Element field) {
233 if (!names.containsKey(field)) add(field); 233 if (!names.containsKey(field)) add(field);
234 return names[field]; 234 return names[field];
235 } 235 }
236 } 236 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart ('k') | pkg/compiler/lib/src/js_backend/frequency_namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698