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

Unified Diff: pkg/compiler/lib/src/util/util.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
« no previous file with comments | « pkg/compiler/lib/src/util/uri_extras.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/util/util.dart
diff --git a/pkg/compiler/lib/src/util/util.dart b/pkg/compiler/lib/src/util/util.dart
index a91f6cda0a4cfb23ddd91905c27affbe10cd21cb..102ca9e1a021d5f80383ecd92d206943c61f5c5d 100644
--- a/pkg/compiler/lib/src/util/util.dart
+++ b/pkg/compiler/lib/src/util/util.dart
@@ -116,9 +116,9 @@ void writeJsonEscapedCharsOn(String string, buffer) {
} else if (code == $LS) {
// This Unicode line terminator and $PS are invalid in JS string
// literals.
- addCodeUnitEscaped(buffer, $LS); // 0x2028.
+ addCodeUnitEscaped(buffer, $LS); // 0x2028.
} else if (code == $PS) {
- addCodeUnitEscaped(buffer, $PS); // 0x2029.
+ addCodeUnitEscaped(buffer, $PS); // 0x2029.
} else if (code == $BACKSLASH) {
buffer.write(r'\\');
} else {
@@ -143,8 +143,13 @@ void writeJsonEscapedCharsOn(String string, buffer) {
for (int i = 0; i < string.length; i++) {
int code = string.codeUnitAt(i);
- if (code < 0x20 || code == $DEL || code == $DQ || code == $LS ||
- code == $PS || code == $BACKSLASH || code >= 0x80) {
+ if (code < 0x20 ||
+ code == $DEL ||
+ code == $DQ ||
+ code == $LS ||
+ code == $PS ||
+ code == $BACKSLASH ||
+ code >= 0x80) {
writeEscapedOn(string, buffer);
return;
}
@@ -153,20 +158,22 @@ void writeJsonEscapedCharsOn(String string, buffer) {
}
int computeHashCode(part1, [part2, part3, part4, part5]) {
- return (part1.hashCode
- ^ part2.hashCode
- ^ part3.hashCode
- ^ part4.hashCode
- ^ part5.hashCode) & 0x3fffffff;
+ return (part1.hashCode ^
+ part2.hashCode ^
+ part3.hashCode ^
+ part4.hashCode ^
+ part5.hashCode) &
+ 0x3fffffff;
}
-String modifiersToString({bool isStatic: false,
- bool isAbstract: false,
- bool isFinal: false,
- bool isVar: false,
- bool isConst: false,
- bool isFactory: false,
- bool isExternal: false}) {
+String modifiersToString(
+ {bool isStatic: false,
+ bool isAbstract: false,
+ bool isFinal: false,
+ bool isVar: false,
+ bool isConst: false,
+ bool isFactory: false,
+ bool isExternal: false}) {
LinkBuilder<String> builder = new LinkBuilder<String>();
if (isStatic) builder.addLast('static');
if (isAbstract) builder.addLast('abstract');
@@ -197,10 +204,9 @@ class Pair<A, B> {
String toString() => '($a,$b)';
}
-
int longestCommonPrefixLength(List a, List b) {
int index = 0;
- for ( ; index < a.length && index < b.length; index++) {
+ for (; index < a.length && index < b.length; index++) {
if (a[index] != b[index]) {
break;
}
« no previous file with comments | « pkg/compiler/lib/src/util/uri_extras.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698