| 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 visitVectorCopy(VectorCopy node) { | 860 visitVectorCopy(VectorCopy node) { |
| 861 writeByte(Tag.VectorCopy); | 861 writeByte(Tag.VectorCopy); |
| 862 writeNode(node.vectorExpression); | 862 writeNode(node.vectorExpression); |
| 863 } | 863 } |
| 864 | 864 |
| 865 visitClosureCreation(ClosureCreation node) { | 865 visitClosureCreation(ClosureCreation node) { |
| 866 writeByte(Tag.ClosureCreation); | 866 writeByte(Tag.ClosureCreation); |
| 867 writeReference(node.topLevelFunctionReference); | 867 writeReference(node.topLevelFunctionReference); |
| 868 writeNode(node.contextVector); | 868 writeNode(node.contextVector); |
| 869 writeNode(node.functionType); | 869 writeNode(node.functionType); |
| 870 writeNodeList(node.typeArgs); |
| 870 } | 871 } |
| 871 | 872 |
| 872 writeStatementOrEmpty(Statement node) { | 873 writeStatementOrEmpty(Statement node) { |
| 873 if (node == null) { | 874 if (node == null) { |
| 874 writeByte(Tag.EmptyStatement); | 875 writeByte(Tag.EmptyStatement); |
| 875 } else { | 876 } else { |
| 876 writeNode(node); | 877 writeNode(node); |
| 877 } | 878 } |
| 878 } | 879 } |
| 879 | 880 |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1509 _sink.add(_buffer.sublist(0, length)); | 1510 _sink.add(_buffer.sublist(0, length)); |
| 1510 _buffer = new Uint8List(SIZE); | 1511 _buffer = new Uint8List(SIZE); |
| 1511 flushedLength += length; | 1512 flushedLength += length; |
| 1512 length = 0; | 1513 length = 0; |
| 1513 } | 1514 } |
| 1514 | 1515 |
| 1515 void flushAndDestroy() { | 1516 void flushAndDestroy() { |
| 1516 _sink.add(_buffer.sublist(0, length)); | 1517 _sink.add(_buffer.sublist(0, length)); |
| 1517 } | 1518 } |
| 1518 } | 1519 } |
| OLD | NEW |