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

Unified Diff: pkg/compiler/lib/src/js_backend/field_naming_mixin.dart

Issue 1212613009: dart2js: Implement frequency based naming. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Reserve reserved names :) Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/frequency_namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
diff --git a/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart b/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
index 1666ca52da706d712442797575ec0a188586ee41..707e7e7636929fe89ff84514e6d5a3e390f5bd20 100644
--- a/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
+++ b/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
@@ -44,7 +44,7 @@ abstract class _MinifiedFieldNamer implements Namer {
* hierarchy is encoded using instances of [_FieldNamingScope].
*/
class _FieldNamingRegistry {
- final MinifyNamer namer;
+ final Namer namer;
final Map<Entity, _FieldNamingScope> scopes =
new Map<Entity, _FieldNamingScope>();
@@ -77,8 +77,7 @@ class _FieldNamingRegistry {
nameStore.add(
new StringBackedName(MinifyNamer._reservedNativeProperties[index]));
} else {
- nameStore.add(namer.getFreshName("field$index", namer.usedInstanceNames,
- namer.suggestedInstanceNames));
+ nameStore.add(namer.getFreshName(NamingScope.instance, "field$index"));
}
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.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