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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 } | 1006 } |
1007 | 1007 |
1008 visitNamedType(NamedType node) { | 1008 visitNamedType(NamedType node) { |
1009 writeStringReference(node.name); | 1009 writeStringReference(node.name); |
1010 writeNode(node.type); | 1010 writeNode(node.type); |
1011 } | 1011 } |
1012 | 1012 |
1013 visitTypeParameterType(TypeParameterType node) { | 1013 visitTypeParameterType(TypeParameterType node) { |
1014 writeByte(Tag.TypeParameterType); | 1014 writeByte(Tag.TypeParameterType); |
1015 writeUInt30(_typeParameterIndexer[node.parameter]); | 1015 writeUInt30(_typeParameterIndexer[node.parameter]); |
| 1016 writeOptionalNode(node.bound); |
1016 } | 1017 } |
1017 | 1018 |
1018 visitVectorType(VectorType node) { | 1019 visitVectorType(VectorType node) { |
1019 writeByte(Tag.VectorType); | 1020 writeByte(Tag.VectorType); |
1020 } | 1021 } |
1021 | 1022 |
1022 visitTypedefType(TypedefType node) { | 1023 visitTypedefType(TypedefType node) { |
1023 writeByte(Tag.TypedefType); | 1024 writeByte(Tag.TypedefType); |
1024 writeReference(node.typedefReference); | 1025 writeReference(node.typedefReference); |
1025 writeNodeList(node.typeArguments); | 1026 writeNodeList(node.typeArguments); |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1351 void flush() { | 1352 void flush() { |
1352 _sink.add(_buffer.sublist(0, length)); | 1353 _sink.add(_buffer.sublist(0, length)); |
1353 _buffer = new Uint8List(SIZE); | 1354 _buffer = new Uint8List(SIZE); |
1354 length = 0; | 1355 length = 0; |
1355 } | 1356 } |
1356 | 1357 |
1357 void flushAndDestroy() { | 1358 void flushAndDestroy() { |
1358 _sink.add(_buffer.sublist(0, length)); | 1359 _sink.add(_buffer.sublist(0, length)); |
1359 } | 1360 } |
1360 } | 1361 } |
OLD | NEW |