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

Unified Diff: pkg/compiler/lib/src/js_backend/frequency_namer.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 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 fa3b79bc7b14135ded0d03ed26be129410554929..7698c3d4bd836f9ddfa59cef2c02813fb89d8eea 100644
--- a/pkg/compiler/lib/src/js_backend/frequency_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
@@ -4,8 +4,9 @@
part of js_backend;
-class FrequencyBasedNamer extends Namer with _MinifiedFieldNamer,
- _MinifiedOneShotInterceptorNamer implements jsAst.TokenFinalizer {
+class FrequencyBasedNamer extends Namer
+ with _MinifiedFieldNamer, _MinifiedOneShotInterceptorNamer
+ implements jsAst.TokenFinalizer {
_FieldNamingRegistry fieldRegistry;
List<TokenName> tokens = new List<TokenName>();
@@ -45,19 +46,15 @@ class FrequencyBasedNamer extends Namer with _MinifiedFieldNamer,
@override
jsAst.Name getFreshName(NamingScope scope, String proposedName,
- {bool sanitizeForNatives: false,
- bool sanitizeForAnnotations: false}) {
+ {bool sanitizeForNatives: false, bool sanitizeForAnnotations: false}) {
// Grab the scope for this token
- TokenScope tokenScope = _tokenScopes.putIfAbsent(scope,
- () => newScopeFor(scope));
+ TokenScope tokenScope =
+ _tokenScopes.putIfAbsent(scope, () => newScopeFor(scope));
// Get the name the normal namer would use as a key.
- String proposed = _generateFreshStringForName(proposedName,
- scope,
- sanitizeForNatives:
- sanitizeForNatives,
- sanitizeForAnnotations:
- sanitizeForAnnotations);
+ String proposed = _generateFreshStringForName(proposedName, scope,
+ sanitizeForNatives: sanitizeForNatives,
+ sanitizeForAnnotations: sanitizeForAnnotations);
TokenName name = new TokenName(tokenScope, proposed);
tokens.add(name);
@@ -136,9 +133,8 @@ class TokenScope {
proposal = new String.fromCharCodes(_nextName);
_incrementName();
} while (MinifyNamer._hasBannedPrefix(proposal) ||
- illegalNames.contains(proposal));
+ illegalNames.contains(proposal));
return proposal;
}
}
-
« no previous file with comments | « pkg/compiler/lib/src/js_backend/field_naming_mixin.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698