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

Unified Diff: pkg/kernel/lib/binary/ast_to_binary.dart

Issue 2931813002: [kernel] Stream kernel_reader (Closed)
Patch Set: Feedback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | runtime/vm/bootstrap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/binary/ast_to_binary.dart
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index b3634ff2bddd68e423757cee726eef358a012c23..0b6c21f0fb49805322aea0ea46ccb0f0dbbbaf46 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -1096,7 +1096,10 @@ class BinaryPrinter extends Visitor {
visitTypeParameterType(TypeParameterType node) {
writeByte(Tag.TypeParameterType);
writeUInt30(_typeParameterIndexer[node.parameter]);
- writeUInt30(node.parameter.binaryOffset);
+ List<TypeParameter> typeParameters =
+ _typeParameterIndexer.indexList[node.parameter];
+ writeUInt30(typeParameters[0].binaryOffset);
+ writeUInt30(typeParameters.indexOf(node.parameter));
writeOptionalNode(node.bound);
}
@@ -1208,11 +1211,14 @@ class SwitchCaseIndexer {
class TypeParameterIndexer {
final Map<TypeParameter, int> index = <TypeParameter, int>{};
+ final Map<TypeParameter, List<TypeParameter>> indexList =
+ <TypeParameter, List<TypeParameter>>{};
int stackHeight = 0;
void enter(List<TypeParameter> typeParameters) {
for (var parameter in typeParameters) {
index[parameter] = stackHeight;
+ indexList[parameter] = typeParameters;
++stackHeight;
}
}
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | runtime/vm/bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698