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

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

Issue 2944843002: All strong mode cleaning of dart2js. (Closed)
Patch Set: More issues discovered during testing. Created 3 years, 6 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.namer; 5 part of js_backend.namer;
6 6
7 class FrequencyBasedNamer extends Namer 7 class FrequencyBasedNamer extends Namer
8 with _MinifiedFieldNamer, _MinifiedOneShotInterceptorNamer 8 with _MinifiedFieldNamer, _MinifiedOneShotInterceptorNamer
9 implements jsAst.TokenFinalizer { 9 implements jsAst.TokenFinalizer {
10 _FieldNamingRegistry fieldRegistry; 10 _FieldNamingRegistry fieldRegistry;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 String proposed = _generateFreshStringForName(proposedName, scope, 60 String proposed = _generateFreshStringForName(proposedName, scope,
61 sanitizeForNatives: sanitizeForNatives, 61 sanitizeForNatives: sanitizeForNatives,
62 sanitizeForAnnotations: sanitizeForAnnotations); 62 sanitizeForAnnotations: sanitizeForAnnotations);
63 63
64 TokenName name = new TokenName(tokenScope, proposed); 64 TokenName name = new TokenName(tokenScope, proposed);
65 tokens.add(name); 65 tokens.add(name);
66 return name; 66 return name;
67 } 67 }
68 68
69 @override 69 @override
70 jsAst.Name instanceFieldPropertyName(FieldElement element) { 70 jsAst.Name instanceFieldPropertyName(FieldEntity element) {
71 jsAst.Name proposed = _minifiedInstanceFieldPropertyName(element); 71 jsAst.Name proposed = _minifiedInstanceFieldPropertyName(element);
72 if (proposed != null) { 72 if (proposed != null) {
73 return proposed; 73 return proposed;
74 } 74 }
75 return super.instanceFieldPropertyName(element); 75 return super.instanceFieldPropertyName(element);
76 } 76 }
77 77
78 @override 78 @override
79 void finalizeTokens() { 79 void finalizeTokens() {
80 int compareReferenceCount(TokenName a, TokenName b) { 80 int compareReferenceCount(TokenName a, TokenName b) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 String proposal; 136 String proposal;
137 do { 137 do {
138 proposal = new String.fromCharCodes(_nextName); 138 proposal = new String.fromCharCodes(_nextName);
139 _incrementName(); 139 _incrementName();
140 } while (MinifyNamer._hasBannedPrefix(proposal) || 140 } while (MinifyNamer._hasBannedPrefix(proposal) ||
141 illegalNames.contains(proposal)); 141 illegalNames.contains(proposal));
142 142
143 return proposal; 143 return proposal;
144 } 144 }
145 } 145 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/field_naming_mixin.dart ('k') | pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698