| Index: pkg/kernel/lib/binary/ast_from_binary.dart
|
| diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
|
| index a4d4a941efecb06d591a67e197507975cf2e9fc3..aa9641b672f5901a4a675b1089cd4fb6f5e31dbc 100644
|
| --- a/pkg/kernel/lib/binary/ast_from_binary.dart
|
| +++ b/pkg/kernel/lib/binary/ast_from_binary.dart
|
| @@ -4,6 +4,7 @@
|
| library kernel.ast_from_binary;
|
|
|
| import 'dart:convert';
|
| +import 'dart:typed_data';
|
|
|
| import '../ast.dart';
|
| import '../transformations/flags.dart';
|
| @@ -74,6 +75,13 @@ class BinaryBuilder {
|
| readByte();
|
| }
|
|
|
| + List<int> readUtf8Bytes() {
|
| + List<int> bytes = new Uint8List(readUInt());
|
| + bytes.setRange(0, bytes.length, _bytes, _byteIndex);
|
| + _byteIndex += bytes.length;
|
| + return bytes;
|
| + }
|
| +
|
| String readStringEntry() {
|
| int numBytes = readUInt();
|
| // Utf8Decoder will skip leading BOM characters, but we must preserve them.
|
| @@ -271,7 +279,7 @@ class BinaryBuilder {
|
| Map<String, Source> uriToSource = <String, Source>{};
|
| for (int i = 0; i < length; ++i) {
|
| String uri = _sourceUriTable[i];
|
| - String sourceCode = readStringEntry();
|
| + List<int> sourceCode = readUtf8Bytes();
|
| int lineCount = readUInt();
|
| List<int> lineStarts = new List<int>(lineCount);
|
| int previousLineStart = 0;
|
|
|