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

Unified Diff: pkg/kernel/lib/binary/ast_to_binary.dart

Issue 2999633002: [kernel] Offsets on loops (Closed)
Patch Set: Fix long line Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
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 7b57e7bbcce4d2df1a5de82723e07bd0069da60f..f3d181eb68a1508333b49d90fba3f46025e08b4c 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -947,12 +947,14 @@ class BinaryPrinter extends Visitor {
visitWhileStatement(WhileStatement node) {
writeByte(Tag.WhileStatement);
+ writeOffset(node.fileOffset);
writeNode(node.condition);
writeNode(node.body);
}
visitDoStatement(DoStatement node) {
writeByte(Tag.DoStatement);
+ writeOffset(node.fileOffset);
writeNode(node.body);
writeNode(node.condition);
}
@@ -960,6 +962,7 @@ class BinaryPrinter extends Visitor {
visitForStatement(ForStatement node) {
_variableIndexer.pushScope();
writeByte(Tag.ForStatement);
+ writeOffset(node.fileOffset);
writeVariableDeclarationList(node.variables);
writeOptionalNode(node.condition);
writeNodeList(node.updates);
@@ -971,6 +974,7 @@ class BinaryPrinter extends Visitor {
_variableIndexer.pushScope();
writeByte(node.isAsync ? Tag.AsyncForInStatement : Tag.ForInStatement);
writeOffset(node.fileOffset);
+ writeOffset(node.bodyOffset);
ahe 2017/08/08 11:38:50 Notice how we don't need to document that we're wr
writeVariableDeclaration(node.variable);
writeNode(node.iterable);
writeNode(node.body);

Powered by Google App Engine
This is Rietveld 408576698