| Index: sdk/lib/utf/utf16.dart
|
| diff --git a/sdk/lib/utf/utf16.dart b/sdk/lib/utf/utf16.dart
|
| index d1bd012fc5992a3d4e33d684ad9515dd897d625f..999a53b39ffa4f998c4bdf6855016ec9b64172ee 100644
|
| --- a/sdk/lib/utf/utf16.dart
|
| +++ b/sdk/lib/utf/utf16.dart
|
| @@ -62,15 +62,8 @@ String decodeUtf16(List<int> bytes, [int offset = 0, int length,
|
| Utf16BytesToCodeUnitsDecoder decoder = new Utf16BytesToCodeUnitsDecoder(bytes,
|
| offset, length, replacementCodepoint);
|
| List<int> codeunits = decoder.decodeRest();
|
| - // TODO is16BitCodeUnit() is used to work around a bug with dart2js
|
| - // (http://code.google.com/p/dart/issues/detail?id=1357). Consider
|
| - // removing after this issue is resolved.
|
| - if (_is16BitCodeUnit()) {
|
| - return new String.fromCharCodes(codeunits);
|
| - } else {
|
| - return new String.fromCharCodes(
|
| - _utf16CodeUnitsToCodepoints(codeunits, 0, null, replacementCodepoint));
|
| - }
|
| + return new String.fromCharCodes(
|
| + _utf16CodeUnitsToCodepoints(codeunits, 0, null, replacementCodepoint));
|
| }
|
|
|
| /**
|
| @@ -88,12 +81,8 @@ String decodeUtf16be(List<int> bytes, [int offset = 0, int length,
|
| // TODO is16BitCodeUnit() is used to work around a bug with dart2js
|
| // (http://code.google.com/p/dart/issues/detail?id=1357). Consider
|
| // removing after this issue is resolved.
|
| - if (_is16BitCodeUnit()) {
|
| - return new String.fromCharCodes(codeunits);
|
| - } else {
|
| - return new String.fromCharCodes(
|
| - _utf16CodeUnitsToCodepoints(codeunits, 0, null, replacementCodepoint));
|
| - }
|
| + return new String.fromCharCodes(
|
| + _utf16CodeUnitsToCodepoints(codeunits, 0, null, replacementCodepoint));
|
| }
|
|
|
| /**
|
| @@ -111,12 +100,8 @@ String decodeUtf16le(List<int> bytes, [int offset = 0, int length,
|
| // TODO is16BitCodeUnit() is used to work around a bug with dart2js
|
| // (http://code.google.com/p/dart/issues/detail?id=1357). Consider
|
| // removing after this issue is resolved.
|
| - if (_is16BitCodeUnit()) {
|
| - return new String.fromCharCodes(codeunits);
|
| - } else {
|
| - return new String.fromCharCodes(
|
| - _utf16CodeUnitsToCodepoints(codeunits, 0, null, replacementCodepoint));
|
| - }
|
| + return new String.fromCharCodes(
|
| + _utf16CodeUnitsToCodepoints(codeunits, 0, null, replacementCodepoint));
|
| }
|
|
|
| /**
|
| @@ -201,11 +186,7 @@ List<int> _stringToUtf16CodeUnits(String str) {
|
| // TODO is16BitCodeUnit() is used to work around a bug with dart2js
|
| // (http://code.google.com/p/dart/issues/detail?id=1357). Consider
|
| // removing after this issue is resolved.
|
| - if (_is16BitCodeUnit()) {
|
| - return str.charCodes;
|
| - } else {
|
| - return _codepointsToUtf16CodeUnits(str.charCodes);
|
| - }
|
| + return _codepointsToUtf16CodeUnits(str.charCodes);
|
| }
|
|
|
| typedef _ListRangeIterator _CodeUnitsProvider();
|
|
|