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

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

Issue 3004693002: [kernel] Add offset to SwitchContinueStatement; add debugging test (Closed)
Patch Set: ... Created 3 years, 3 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
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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 for (int i = 0; i < length; ++i) { 982 for (int i = 0; i < length; ++i) {
983 writeOffset(node.expressionOffsets[i]); 983 writeOffset(node.expressionOffsets[i]);
984 writeNode(node.expressions[i]); 984 writeNode(node.expressions[i]);
985 } 985 }
986 writeByte(node.isDefault ? 1 : 0); 986 writeByte(node.isDefault ? 1 : 0);
987 writeNode(node.body); 987 writeNode(node.body);
988 } 988 }
989 989
990 visitContinueSwitchStatement(ContinueSwitchStatement node) { 990 visitContinueSwitchStatement(ContinueSwitchStatement node) {
991 writeByte(Tag.ContinueSwitchStatement); 991 writeByte(Tag.ContinueSwitchStatement);
992 writeOffset(node.fileOffset);
992 writeUInt30(_switchCaseIndexer[node.target]); 993 writeUInt30(_switchCaseIndexer[node.target]);
993 } 994 }
994 995
995 visitIfStatement(IfStatement node) { 996 visitIfStatement(IfStatement node) {
996 writeByte(Tag.IfStatement); 997 writeByte(Tag.IfStatement);
997 writeNode(node.condition); 998 writeNode(node.condition);
998 writeNode(node.then); 999 writeNode(node.then);
999 writeStatementOrEmpty(node.otherwise); 1000 writeStatementOrEmpty(node.otherwise);
1000 } 1001 }
1001 1002
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 _sink.add(_buffer.sublist(0, length)); 1553 _sink.add(_buffer.sublist(0, length));
1553 _buffer = new Uint8List(SIZE); 1554 _buffer = new Uint8List(SIZE);
1554 flushedLength += length; 1555 flushedLength += length;
1555 length = 0; 1556 length = 0;
1556 } 1557 }
1557 1558
1558 void flushAndDestroy() { 1559 void flushAndDestroy() {
1559 _sink.add(_buffer.sublist(0, length)); 1560 _sink.add(_buffer.sublist(0, length));
1560 } 1561 }
1561 } 1562 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698