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

Side by Side Diff: pkg/kernel/lib/binary/ast_to_binary.dart

Issue 2952883003: Make the kernel API for promoted type parameter bounds less error-prone. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « pkg/kernel/lib/ast.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 writeNode(node.type); 1093 writeNode(node.type);
1094 } 1094 }
1095 1095
1096 visitTypeParameterType(TypeParameterType node) { 1096 visitTypeParameterType(TypeParameterType node) {
1097 writeByte(Tag.TypeParameterType); 1097 writeByte(Tag.TypeParameterType);
1098 writeUInt30(_typeParameterIndexer[node.parameter]); 1098 writeUInt30(_typeParameterIndexer[node.parameter]);
1099 List<TypeParameter> typeParameters = 1099 List<TypeParameter> typeParameters =
1100 _typeParameterIndexer.indexList[node.parameter]; 1100 _typeParameterIndexer.indexList[node.parameter];
1101 writeUInt30(typeParameters[0].binaryOffset); 1101 writeUInt30(typeParameters[0].binaryOffset);
1102 writeUInt30(typeParameters.indexOf(node.parameter)); 1102 writeUInt30(typeParameters.indexOf(node.parameter));
1103 writeOptionalNode(node.bound); 1103 writeOptionalNode(node.promotedBound);
1104 } 1104 }
1105 1105
1106 visitVectorType(VectorType node) { 1106 visitVectorType(VectorType node) {
1107 writeByte(Tag.VectorType); 1107 writeByte(Tag.VectorType);
1108 } 1108 }
1109 1109
1110 visitTypedefType(TypedefType node) { 1110 visitTypedefType(TypedefType node) {
1111 writeByte(Tag.TypedefType); 1111 writeByte(Tag.TypedefType);
1112 writeReference(node.typedefReference); 1112 writeReference(node.typedefReference);
1113 writeNodeList(node.typeArguments); 1113 writeNodeList(node.typeArguments);
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 _sink.add(_buffer.sublist(0, length)); 1471 _sink.add(_buffer.sublist(0, length));
1472 _buffer = new Uint8List(SIZE); 1472 _buffer = new Uint8List(SIZE);
1473 flushedLength += length; 1473 flushedLength += length;
1474 length = 0; 1474 length = 0;
1475 } 1475 }
1476 1476
1477 void flushAndDestroy() { 1477 void flushAndDestroy() {
1478 _sink.add(_buffer.sublist(0, length)); 1478 _sink.add(_buffer.sublist(0, length));
1479 } 1479 }
1480 } 1480 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/ast.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698