| 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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 writeNode(node.value); | 822 writeNode(node.value); |
| 823 } | 823 } |
| 824 | 824 |
| 825 visitAwaitExpression(AwaitExpression node) { | 825 visitAwaitExpression(AwaitExpression node) { |
| 826 writeByte(Tag.AwaitExpression); | 826 writeByte(Tag.AwaitExpression); |
| 827 writeNode(node.operand); | 827 writeNode(node.operand); |
| 828 } | 828 } |
| 829 | 829 |
| 830 visitFunctionExpression(FunctionExpression node) { | 830 visitFunctionExpression(FunctionExpression node) { |
| 831 writeByte(Tag.FunctionExpression); | 831 writeByte(Tag.FunctionExpression); |
| 832 writeOffset(node.fileOffset); |
| 832 writeNode(node.function); | 833 writeNode(node.function); |
| 833 } | 834 } |
| 834 | 835 |
| 835 visitLet(Let node) { | 836 visitLet(Let node) { |
| 836 writeByte(Tag.Let); | 837 writeByte(Tag.Let); |
| 837 writeVariableDeclaration(node.variable); | 838 writeVariableDeclaration(node.variable); |
| 838 writeNode(node.body); | 839 writeNode(node.body); |
| 839 --_variableIndexer.stackHeight; | 840 --_variableIndexer.stackHeight; |
| 840 } | 841 } |
| 841 | 842 |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 _sink.add(_buffer.sublist(0, length)); | 1551 _sink.add(_buffer.sublist(0, length)); |
| 1551 _buffer = new Uint8List(SIZE); | 1552 _buffer = new Uint8List(SIZE); |
| 1552 flushedLength += length; | 1553 flushedLength += length; |
| 1553 length = 0; | 1554 length = 0; |
| 1554 } | 1555 } |
| 1555 | 1556 |
| 1556 void flushAndDestroy() { | 1557 void flushAndDestroy() { |
| 1557 _sink.add(_buffer.sublist(0, length)); | 1558 _sink.add(_buffer.sublist(0, length)); |
| 1558 } | 1559 } |
| 1559 } | 1560 } |
| OLD | NEW |