| OLD | NEW |
| 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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 writeVariableDeclarationList(node.variables); | 804 writeVariableDeclarationList(node.variables); |
| 805 writeOptionalNode(node.condition); | 805 writeOptionalNode(node.condition); |
| 806 writeNodeList(node.updates); | 806 writeNodeList(node.updates); |
| 807 writeNode(node.body); | 807 writeNode(node.body); |
| 808 _variableIndexer.popScope(); | 808 _variableIndexer.popScope(); |
| 809 } | 809 } |
| 810 | 810 |
| 811 visitForInStatement(ForInStatement node) { | 811 visitForInStatement(ForInStatement node) { |
| 812 _variableIndexer.pushScope(); | 812 _variableIndexer.pushScope(); |
| 813 writeByte(node.isAsync ? Tag.AsyncForInStatement : Tag.ForInStatement); | 813 writeByte(node.isAsync ? Tag.AsyncForInStatement : Tag.ForInStatement); |
| 814 writeOffset(node, node.fileOffset); |
| 814 writeVariableDeclaration(node.variable); | 815 writeVariableDeclaration(node.variable); |
| 815 writeNode(node.iterable); | 816 writeNode(node.iterable); |
| 816 writeNode(node.body); | 817 writeNode(node.body); |
| 817 _variableIndexer.popScope(); | 818 _variableIndexer.popScope(); |
| 818 } | 819 } |
| 819 | 820 |
| 820 visitSwitchStatement(SwitchStatement node) { | 821 visitSwitchStatement(SwitchStatement node) { |
| 821 _switchCaseIndexer.enter(node); | 822 _switchCaseIndexer.enter(node); |
| 822 writeByte(Tag.SwitchStatement); | 823 writeByte(Tag.SwitchStatement); |
| 823 writeNode(node.expression); | 824 writeNode(node.expression); |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 void flush() { | 1281 void flush() { |
| 1281 _sink.add(_buffer.sublist(0, length)); | 1282 _sink.add(_buffer.sublist(0, length)); |
| 1282 _buffer = new Uint8List(SIZE); | 1283 _buffer = new Uint8List(SIZE); |
| 1283 length = 0; | 1284 length = 0; |
| 1284 } | 1285 } |
| 1285 | 1286 |
| 1286 void flushAndDestroy() { | 1287 void flushAndDestroy() { |
| 1287 _sink.add(_buffer.sublist(0, length)); | 1288 _sink.add(_buffer.sublist(0, length)); |
| 1288 } | 1289 } |
| 1289 } | 1290 } |
| OLD | NEW |