| 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;
|
| }
|
|
|