| Index: pkg/compiler/lib/src/scanner/token.dart
|
| diff --git a/pkg/compiler/lib/src/scanner/token.dart b/pkg/compiler/lib/src/scanner/token.dart
|
| index 483eda9fcf3d68aed4932ae4bf14a5530b0870ef..76229cd40b80016426343386ba69139551926d03 100644
|
| --- a/pkg/compiler/lib/src/scanner/token.dart
|
| +++ b/pkg/compiler/lib/src/scanner/token.dart
|
| @@ -385,12 +385,9 @@ class StringToken extends Token {
|
| static String decodeUtf8(List<int> data, int start, int end, bool asciiOnly) {
|
| var s;
|
| if (asciiOnly) {
|
| - // getRange returns an iterator, it does not copy the data.
|
| - s = new String.fromCharCodes(data.getRange(start, end));
|
| + s = new String.fromCharCodes(data, start, end);
|
| } else {
|
| - // TODO(lry): this is measurably slow. Also sublist is copied eagerly.
|
| - var bytes = data.sublist(start, end);
|
| - s = UTF8.decode(bytes);
|
| + s = UTF8.decoder.convert(data, start, end);
|
| }
|
| return canonicalizedString(s, true);
|
| }
|
|
|