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

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

Issue 2866593003: Add an optional bound to type parameter references (Closed)
Patch Set: Don't leak the bound if it ever becomes non-null Created 3 years, 7 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/binary/ast_from_binary.dart ('k') | runtime/vm/kernel_binary.cc » ('j') | 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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | runtime/vm/kernel_binary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698