Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: pkg/kernel/lib/binary/ast_to_binary.dart

Issue 2838983002: Fix a pair of issues in the Dart code for the front end. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 library kernel.ast_to_binary; 4 library kernel.ast_to_binary;
5 5
6 import '../ast.dart'; 6 import '../ast.dart';
7 import '../import_table.dart'; 7 import '../import_table.dart';
8 import 'tag.dart'; 8 import 'tag.dart';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:typed_data'; 10 import 'dart:typed_data';
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 : predicate = predicate, 1031 : predicate = predicate,
1032 super(sink); 1032 super(sink);
1033 1033
1034 void writeProgramFile(Program program) { 1034 void writeProgramFile(Program program) {
1035 program.computeCanonicalNames(); 1035 program.computeCanonicalNames();
1036 writeMagicWord(Tag.ProgramFile); 1036 writeMagicWord(Tag.ProgramFile);
1037 _stringIndexer.scanProgram(program); 1037 _stringIndexer.scanProgram(program);
1038 writeStringTable(_stringIndexer); 1038 writeStringTable(_stringIndexer);
1039 writeUriToSource(program); 1039 writeUriToSource(program);
1040 writeLinkTable(program); 1040 writeLinkTable(program);
1041 writeList(program.libraries.where(predicate), writeNode); 1041 writeList(program.libraries.where(predicate).toList(), writeNode);
1042 writeMemberReference(program.mainMethod, allowNull: true); 1042 writeMemberReference(program.mainMethod, allowNull: true);
1043 _flush(); 1043 _flush();
1044 } 1044 }
1045 } 1045 }
1046 1046
1047 class VariableIndexer { 1047 class VariableIndexer {
1048 final Map<VariableDeclaration, int> index = <VariableDeclaration, int>{}; 1048 final Map<VariableDeclaration, int> index = <VariableDeclaration, int>{};
1049 final List<int> scopes = <int>[]; 1049 final List<int> scopes = <int>[];
1050 int stackHeight = 0; 1050 int stackHeight = 0;
1051 1051
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 void flush() { 1333 void flush() {
1334 _sink.add(_buffer.sublist(0, length)); 1334 _sink.add(_buffer.sublist(0, length));
1335 _buffer = new Uint8List(SIZE); 1335 _buffer = new Uint8List(SIZE);
1336 length = 0; 1336 length = 0;
1337 } 1337 }
1338 1338
1339 void flushAndDestroy() { 1339 void flushAndDestroy() {
1340 _sink.add(_buffer.sublist(0, length)); 1340 _sink.add(_buffer.sublist(0, length));
1341 } 1341 }
1342 } 1342 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698