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

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

Issue 1428853004: Use better names for captured variables in closures. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 5 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_backend/frequency_namer.dart
diff --git a/pkg/compiler/lib/src/js_backend/frequency_namer.dart b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
index 0aaf8f6703737c9e5bf4d06f6f67cb8124f96b31..6fa2ccf8ec9e6b513baf7007a15cfdd016f94341 100644
--- a/pkg/compiler/lib/src/js_backend/frequency_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
@@ -26,7 +26,7 @@ class FrequencyBasedNamer extends Namer with _MinifiedFieldNamer,
}
TokenScope newScopeFor(NamingScope scope) {
- if (scope == NamingScope.instance) {
+ if (scope == instanceScope) {
Set<String> illegalNames = new Set<String>.from(jsReserved);
for (String illegal in MinifyNamer._reservedNativeProperties) {
illegalNames.add(illegal);
@@ -50,8 +50,7 @@ class FrequencyBasedNamer extends Namer with _MinifiedFieldNamer,
// Get the name the normal namer would use as a key.
String proposed = _generateFreshStringForName(proposedName,
- getUsedNames(scope),
- getSuggestedNames(scope),
+ scope,
sanitizeForNatives:
sanitizeForNatives,
sanitizeForAnnotations:
« no previous file with comments | « pkg/compiler/lib/src/js_backend/field_naming_mixin.dart ('k') | pkg/compiler/lib/src/js_backend/minify_namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698