@@ -576,8 +576,7 @@ public struct JSTyper: Analyzer {
576576 }
577577
578578 mutating func addArrayType(
579- def: Variable , elementType: ILType , mutability: Bool , elementRef: Variable ? = nil ,
580- concreteHeapSupertype: WasmTypeDescription ? = nil
579+ def: Variable , elementType: ILType , mutability: Bool , elementRef: Variable ? = nil
581580 ) {
582581 assert ( isWithinTypeGroup)
583582 let tgIndex = typeGroups. count - 1
@@ -623,14 +622,12 @@ public struct JSTyper: Analyzer {
623622 description: WasmArrayTypeDescription (
624623 elementType: resolvedElementType,
625624 mutability: mutability,
626- typeGroupIndex: tgIndex,
627- concreteHeapSupertype: concreteHeapSupertype) ) )
625+ typeGroupIndex: tgIndex) ) )
628626 typeGroups [ typeGroups. count - 1 ] . append ( def)
629627 }
630628
631629 mutating func addStructType(
632- def: Variable , fieldsWithRefs: [ ( WasmStructTypeDescription . Field , Variable ? ) ] ,
633- concreteHeapSupertype: WasmTypeDescription ? = nil
630+ def: Variable , fieldsWithRefs: [ ( WasmStructTypeDescription . Field , Variable ? ) ]
634631 ) {
635632 let tgIndex = typeGroups. count - 1
636633 let resolvedFields = fieldsWithRefs. enumerated ( ) . map { ( fieldIndex, fieldWithInput) in
@@ -670,8 +667,7 @@ public struct JSTyper: Analyzer {
670667 def,
671668 . wasmTypeDef(
672669 description: WasmStructTypeDescription (
673- fields: resolvedFields, typeGroupIndex: tgIndex,
674- concreteHeapSupertype: concreteHeapSupertype) ) )
670+ fields: resolvedFields, typeGroupIndex: tgIndex) ) )
675671 typeGroups [ typeGroups. count - 1 ] . append ( def)
676672 }
677673
@@ -2608,17 +2604,13 @@ public struct JSTyper: Analyzer {
26082604 addSignatureType ( def: instr. output, signature: op. signature, inputs: instr. inputs)
26092605
26102606 case . wasmDefineArrayType( let op) :
2611- let elementRef = op. elementType. requiredInputCount ( ) == 1 ? instr. inputs. last! : nil
2612- let concreteHeapSupertype =
2613- op. hasSuperType ? getTypeDescription ( of: instr. inputs. first!) : nil
2607+ let elementRef = op. elementType. requiredInputCount ( ) == 1 ? instr. input ( 0 ) : nil
26142608 addArrayType (
26152609 def: instr. output, elementType: op. elementType, mutability: op. mutability,
2616- elementRef: elementRef, concreteHeapSupertype : concreteHeapSupertype )
2610+ elementRef: elementRef)
26172611
26182612 case . wasmDefineStructType( let op) :
2619- let concreteHeapSupertype =
2620- op. hasSuperType ? getTypeDescription ( of: instr. inputs. first!) : nil
2621- var inputIndex = op. hasSuperType ? 1 : 0
2613+ var inputIndex = 0
26222614 let fieldsWithRefs : [ ( WasmStructTypeDescription . Field , Variable ? ) ] = op. fields. map {
26232615 field in
26242616 if field. type. requiredInputCount ( ) == 0 {
@@ -2630,9 +2622,7 @@ public struct JSTyper: Analyzer {
26302622 }
26312623 }
26322624 assert ( inputIndex == instr. inputs. count)
2633- addStructType (
2634- def: instr. output, fieldsWithRefs: fieldsWithRefs,
2635- concreteHeapSupertype: concreteHeapSupertype)
2625+ addStructType ( def: instr. output, fieldsWithRefs: fieldsWithRefs)
26362626
26372627 case . wasmDefineForwardOrSelfReference( _) :
26382628 set ( instr. output, . wasmSelfReference( ) )
0 commit comments