| Index: sdk/lib/utf/utf16.dart
|
| diff --git a/sdk/lib/utf/utf16.dart b/sdk/lib/utf/utf16.dart
|
| index d1bd012fc5992a3d4e33d684ad9515dd897d625f..a99eadae27e6b4a939f80342531c72708ec94ed3 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));
|
| }
|
|
|
| /**
|
| @@ -85,15 +78,8 @@ String decodeUtf16be(List<int> bytes, [int offset = 0, int length,
|
| int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
|
| List<int> codeunits = (new Utf16beBytesToCodeUnitsDecoder(bytes, offset,
|
| length, stripBom, replacementCodepoint)).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));
|
| }
|
|
|
| /**
|
| @@ -108,15 +94,8 @@ String decodeUtf16le(List<int> bytes, [int offset = 0, int length,
|
| int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
|
| List<int> codeunits = (new Utf16leBytesToCodeUnitsDecoder(bytes, offset,
|
| length, stripBom, replacementCodepoint)).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));
|
| }
|
|
|
| /**
|
| @@ -198,14 +177,7 @@ bool hasUtf16leBom(List<int> utf16EncodedBytes, [int offset = 0, int length]) {
|
| }
|
|
|
| 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();
|
|
|