@@ -1041,16 +1041,12 @@ class RuntimeTypeInformation {
10411041
10421042 /// Table of type names indexed by class id.
10431043 late final InstanceConstant typeNames;
1044- late final DartType typeNamesType;
10451044
10461045 /// See sdk/lib/_internal/wasm/lib/type.dart:_typeRowDisplacement*
10471046 /// for what this contains and how it's used for substitution.
10481047 late final InstanceConstant typeRowDisplacementOffsets;
1049- late final DartType typeRowDisplacementOffsetsType;
10501048 late final InstanceConstant typeRowDisplacementTable;
1051- late final DartType typeRowDisplacementTableType;
10521049 late final InstanceConstant typeRowDisplacementSubstTable;
1053- late final DartType typeRowDisplacementSubstTableType;
10541050
10551051 CoreTypes get coreTypes => translator.coreTypes;
10561052 Types get types => translator.types;
@@ -1210,12 +1206,8 @@ class RuntimeTypeInformation {
12101206 InterfaceType (translator.typeClass, Nullability .nonNullable);
12111207 final arrayOfType = InterfaceType (
12121208 translator.wasmArrayClass, Nullability .nonNullable, [typeType]);
1213- final arrayOfArrayOfType = InterfaceType (
1214- translator.wasmArrayClass, Nullability .nonNullable, [arrayOfType]);
12151209 final wasmI32 =
12161210 InterfaceType (translator.wasmI32Class, Nullability .nonNullable);
1217- final arrayOfI32 = InterfaceType (
1218- translator.wasmArrayClass, Nullability .nonNullable, [wasmI32]);
12191211
12201212 final maxId = translator.classIdNumbering.maxClassId;
12211213 int normalize (int value) => (100 * value) ~ / maxId;
@@ -1231,20 +1223,18 @@ class RuntimeTypeInformation {
12311223 ? 0
12321224 : (entry.$2 == noSubstitutionIndex ? - entry.$1 : entry.$1)),
12331225 ]);
1234- typeRowDisplacementTableType = arrayOfI32;
1226+
12351227 typeRowDisplacementSubstTable =
12361228 translator.constants.makeArrayOf (arrayOfType, [
12371229 for (final entry in table)
12381230 _substitutionTableByIndex[
12391231 entry == null ? noSubstitutionIndex : entry.$2],
12401232 ]);
1241- typeRowDisplacementSubstTableType = arrayOfArrayOfType;
12421233
12431234 typeRowDisplacementOffsets = translator.constants.makeArrayOf (wasmI32, [
12441235 for (int classId = 0 ; classId < translator.classes.length; ++ classId)
12451236 IntConstant (rowForSuperclass[classId]? .offset ?? - 1 ),
12461237 ]);
1247- typeRowDisplacementOffsetsType = arrayOfI32;
12481238 }
12491239
12501240 void _initTypeNames () {
@@ -1262,8 +1252,6 @@ class RuntimeTypeInformation {
12621252 }
12631253 }
12641254 typeNames = translator.constants.makeArrayOf (stringType, nameConstants);
1265- typeNamesType = InterfaceType (
1266- translator.wasmArrayClass, Nullability .nonNullable, [stringType]);
12671255 }
12681256
12691257 Map <int , List <(Range , int )>> _buildRanges (Map <int , Map <int , int >> map) {
@@ -1355,3 +1343,8 @@ class _FunctionTypeParameterOffsetCollector extends RecursiveVisitor {
13551343 }
13561344 }
13571345}
1346+
1347+ extension InstanceConstantInterfaceType on InstanceConstant {
1348+ InterfaceType get interfaceType =>
1349+ InterfaceType (classNode, Nullability .nonNullable, typeArguments);
1350+ }
0 commit comments