Chromium Code Reviews| 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 949470651115955d5c1d2cc4301d7c00647dc06d..4ef84da608c5391b655691d198a9a66c39546fc6 100644 |
| --- a/pkg/kernel/lib/binary/ast_from_binary.dart |
| +++ b/pkg/kernel/lib/binary/ast_from_binary.dart |
| @@ -74,6 +74,10 @@ class BinaryBuilder { |
| readByte(); |
| } |
| + List<int> readRawString() { |
|
ahe
2017/03/03 13:14:50
Change name to readUtf8Bytes, readUint8List, or so
jensj
2017/03/06 07:38:36
Done.
|
| + return new List<int>.generate(readUInt(), (i) => readByte()); |
|
ahe
2017/03/03 13:14:51
How about:
List<int> bytes = new Uint8List(readUI
jensj
2017/03/06 07:38:36
Done.
|
| + } |
| + |
| String readStringEntry() { |
| int numBytes = readUInt(); |
| // Utf8Decoder will skip leading BOM characters, but we must preserve them. |
| @@ -271,7 +275,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 = readRawString(); |
| int lineCount = readUInt(); |
| List<int> lineStarts = new List<int>(lineCount); |
| int previousLineStart = 0; |