| Index: pkg/kernel/lib/binary/ast_to_binary.dart
|
| diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
|
| index a242338dfa7465858ffd90a70a722d55a2556579..243277c37037ff3fd87937fb5b24527741400890 100644
|
| --- a/pkg/kernel/lib/binary/ast_to_binary.dart
|
| +++ b/pkg/kernel/lib/binary/ast_to_binary.dart
|
| @@ -69,6 +69,11 @@ class BinaryPrinter extends Visitor {
|
| writeByte(value & 0xFF);
|
| }
|
|
|
| + void writeRawString(List<int> utf8Bytes) {
|
| + writeUInt30(utf8Bytes.length);
|
| + writeBytes(utf8Bytes);
|
| + }
|
| +
|
| void writeStringTableEntry(String string) {
|
| List<int> utf8Bytes = const Utf8Encoder().convert(string);
|
| writeUInt30(utf8Bytes.length);
|
| @@ -171,9 +176,8 @@ class BinaryPrinter extends Visitor {
|
| writeStringTable(_sourceUriIndexer);
|
| for (int i = 0; i < _sourceUriIndexer.entries.length; i++) {
|
| String uri = _sourceUriIndexer.entries[i].value;
|
| - Source source = program.uriToSource[uri] ?? new Source([], '');
|
| - String sourceCode = source.source;
|
| - writeStringTableEntry(sourceCode);
|
| + Source source = program.uriToSource[uri] ?? new Source([], const <int>[]);
|
| + writeRawString(source.source);
|
| List<int> lineStarts = source.lineStarts;
|
| writeUInt30(lineStarts.length);
|
| int previousLineStart = 0;
|
|
|