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

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

Issue 2973633002: [kernel] Change how TypeParameterType is calculated. (Closed)
Patch Set: longjmp instead of UNREACHABLE (+ rebase) Created 3 years, 4 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/kernel_binary_flowgraph.h » ('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 f3d181eb68a1508333b49d90fba3f46025e08b4c..e889eaad32b6d7ccdb20ee615e2cf1a206b2c12f 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -1164,10 +1164,6 @@ class BinaryPrinter extends Visitor {
visitTypeParameterType(TypeParameterType node) {
writeByte(Tag.TypeParameterType);
writeUInt30(_typeParameterIndexer[node.parameter]);
- List<TypeParameter> typeParameters =
- _typeParameterIndexer.indexList[node.parameter];
- writeUInt30(typeParameters[0].binaryOffset);
- writeUInt30(typeParameters.indexOf(node.parameter));
writeOptionalNode(node.promotedBound);
}
@@ -1283,14 +1279,11 @@ 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/kernel_binary_flowgraph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698