fn type_of(operator: &Operator) -> Type {
    match operator {
        Operator::V128Load { .. }
        | Operator::V128Store { .. }
        | Operator::V128Const { .. }
        | Operator::V128Not
        | Operator::V128And
        | Operator::V128AndNot
        | Operator::V128Or
        | Operator::V128Xor
        | Operator::V128Bitselect => I8X16, // default type representing V128

        Operator::I8x16Shuffle { .. }
        | Operator::I8x16Splat
        | Operator::V128Load8Splat { .. }
        | Operator::I8x16ExtractLaneS { .. }
        | Operator::I8x16ExtractLaneU { .. }
        | Operator::I8x16ReplaceLane { .. }
        | Operator::I8x16Eq
        | Operator::I8x16Ne
        | Operator::I8x16LtS
        | Operator::I8x16LtU
        | Operator::I8x16GtS
        | Operator::I8x16GtU
        | Operator::I8x16LeS
        | Operator::I8x16LeU
        | Operator::I8x16GeS
        | Operator::I8x16GeU
        | Operator::I8x16Neg
        | Operator::I8x16Abs
        | Operator::I8x16AnyTrue
        | Operator::I8x16AllTrue
        | Operator::I8x16Shl
        | Operator::I8x16ShrS
        | Operator::I8x16ShrU
        | Operator::I8x16Add
        | Operator::I8x16AddSatS
        | Operator::I8x16AddSatU
        | Operator::I8x16Sub
        | Operator::I8x16SubSatS
        | Operator::I8x16SubSatU
        | Operator::I8x16MinS
        | Operator::I8x16MinU
        | Operator::I8x16MaxS
        | Operator::I8x16MaxU
        | Operator::I8x16RoundingAverageU
        | Operator::I8x16Bitmask => I8X16,

        Operator::I16x8Splat
        | Operator::V128Load16Splat { .. }
        | Operator::I16x8ExtractLaneS { .. }
        | Operator::I16x8ExtractLaneU { .. }
        | Operator::I16x8ReplaceLane { .. }
        | Operator::I16x8Eq
        | Operator::I16x8Ne
        | Operator::I16x8LtS
        | Operator::I16x8LtU
        | Operator::I16x8GtS
        | Operator::I16x8GtU
        | Operator::I16x8LeS
        | Operator::I16x8LeU
        | Operator::I16x8GeS
        | Operator::I16x8GeU
        | Operator::I16x8Neg
        | Operator::I16x8Abs
        | Operator::I16x8AnyTrue
        | Operator::I16x8AllTrue
        | Operator::I16x8Shl
        | Operator::I16x8ShrS
        | Operator::I16x8ShrU
        | Operator::I16x8Add
        | Operator::I16x8AddSatS
        | Operator::I16x8AddSatU
        | Operator::I16x8Sub
        | Operator::I16x8SubSatS
        | Operator::I16x8SubSatU
        | Operator::I16x8MinS
        | Operator::I16x8MinU
        | Operator::I16x8MaxS
        | Operator::I16x8MaxU
        | Operator::I16x8RoundingAverageU
        | Operator::I16x8Mul
        | Operator::I16x8Bitmask => I16X8,

        Operator::I32x4Splat
        | Operator::V128Load32Splat { .. }
        | Operator::I32x4ExtractLane { .. }
        | Operator::I32x4ReplaceLane { .. }
        | Operator::I32x4Eq
        | Operator::I32x4Ne
        | Operator::I32x4LtS
        | Operator::I32x4LtU
        | Operator::I32x4GtS
        | Operator::I32x4GtU
        | Operator::I32x4LeS
        | Operator::I32x4LeU
        | Operator::I32x4GeS
        | Operator::I32x4GeU
        | Operator::I32x4Neg
        | Operator::I32x4Abs
        | Operator::I32x4AnyTrue
        | Operator::I32x4AllTrue
        | Operator::I32x4Shl
        | Operator::I32x4ShrS
        | Operator::I32x4ShrU
        | Operator::I32x4Add
        | Operator::I32x4Sub
        | Operator::I32x4Mul
        | Operator::I32x4MinS
        | Operator::I32x4MinU
        | Operator::I32x4MaxS
        | Operator::I32x4MaxU
        | Operator::F32x4ConvertI32x4S
        | Operator::F32x4ConvertI32x4U
        | Operator::I32x4Bitmask
        | Operator::V128Load32Zero { .. } => I32X4,

        Operator::I64x2Splat
        | Operator::V128Load64Splat { .. }
        | Operator::I64x2ExtractLane { .. }
        | Operator::I64x2ReplaceLane { .. }
        | Operator::I64x2Neg
        | Operator::I64x2Shl
        | Operator::I64x2ShrS
        | Operator::I64x2ShrU
        | Operator::I64x2Add
        | Operator::I64x2Sub
        | Operator::I64x2Mul
        | Operator::V128Load64Zero { .. } => I64X2,

        Operator::F32x4Splat
        | Operator::F32x4ExtractLane { .. }
        | Operator::F32x4ReplaceLane { .. }
        | Operator::F32x4Eq
        | Operator::F32x4Ne
        | Operator::F32x4Lt
        | Operator::F32x4Gt
        | Operator::F32x4Le
        | Operator::F32x4Ge
        | Operator::F32x4Abs
        | Operator::F32x4Neg
        | Operator::F32x4Sqrt
        | Operator::F32x4Add
        | Operator::F32x4Sub
        | Operator::F32x4Mul
        | Operator::F32x4Div
        | Operator::F32x4Min
        | Operator::F32x4Max
        | Operator::F32x4PMin
        | Operator::F32x4PMax
        | Operator::I32x4TruncSatF32x4S
        | Operator::I32x4TruncSatF32x4U
        | Operator::F32x4Ceil
        | Operator::F32x4Floor
        | Operator::F32x4Trunc
        | Operator::F32x4Nearest => F32X4,

        Operator::F64x2Splat
        | Operator::F64x2ExtractLane { .. }
        | Operator::F64x2ReplaceLane { .. }
        | Operator::F64x2Eq
        | Operator::F64x2Ne
        | Operator::F64x2Lt
        | Operator::F64x2Gt
        | Operator::F64x2Le
        | Operator::F64x2Ge
        | Operator::F64x2Abs
        | Operator::F64x2Neg
        | Operator::F64x2Sqrt
        | Operator::F64x2Add
        | Operator::F64x2Sub
        | Operator::F64x2Mul
        | Operator::F64x2Div
        | Operator::F64x2Min
        | Operator::F64x2Max
        | Operator::F64x2PMin
        | Operator::F64x2PMax
        | Operator::F64x2Ceil
        | Operator::F64x2Floor
        | Operator::F64x2Trunc
        | Operator::F64x2Nearest => F64X2,

        _ => unimplemented!(
            "Currently only SIMD instructions are mapped to their return type; the \
             following instruction is not mapped: {:?}",
            operator
        ),
    }
}
/// Determine the returned value type of a WebAssembly operator
Determine the returned value type of a WebAssembly operator
Determine the returned value type of a WebAssembly operator
fn type_of(operator: &Operator) -> Type {
    match operator {
        Operator::V128Load { .. }
        | Operator::V128Store { .. }
        | Operator::V128Const { .. }
        | Operator::V128Not
        | Operator::V128And
        | Operator::V128AndNot
        | Operator::V128Or
        | Operator::V128Xor
        | Operator::V128Bitselect => I8X16, // default type representing V128
        Operator::I8x16Shuffle { .. }
        | Operator::I8x16Splat
        | Operator::V128Load8Splat { .. }
        | Operator::I8x16ExtractLaneS { .. }
        | Operator::I8x16ExtractLaneU { .. }
        | Operator::I8x16ReplaceLane { .. }
        | Operator::I8x16Eq
        | Operator::I8x16Ne
        | Operator::I8x16LtS
        | Operator::I8x16LtU
        | Operator::I8x16GtS
        | Operator::I8x16GtU
        | Operator::I8x16LeS
        | Operator::I8x16LeU
        | Operator::I8x16GeS
        | Operator::I8x16GeU
        | Operator::I8x16Neg
        | Operator::I8x16Abs
        | Operator::I8x16AnyTrue
        | Operator::I8x16AllTrue
        | Operator::I8x16Shl
        | Operator::I8x16ShrS
        | Operator::I8x16ShrU
        | Operator::I8x16Add
        | Operator::I8x16AddSatS
        | Operator::I8x16AddSatU
        | Operator::I8x16Sub
        | Operator::I8x16SubSatS
        | Operator::I8x16SubSatU
        | Operator::I8x16MinS
        | Operator::I8x16MinU
        | Operator::I8x16MaxS
        | Operator::I8x16MaxU
        | Operator::I8x16RoundingAverageU
        | Operator::I8x16Bitmask => I8X16,
        Operator::I16x8Splat
        | Operator::V128Load16Splat { .. }
        | Operator::I16x8ExtractLaneS { .. }
        | Operator::I16x8ExtractLaneU { .. }
        | Operator::I16x8ReplaceLane { .. }
        | Operator::I16x8Eq
        | Operator::I16x8Ne
        | Operator::I16x8LtS
        | Operator::I16x8LtU
        | Operator::I16x8GtS
        | Operator::I16x8GtU
        | Operator::I16x8LeS
        | Operator::I16x8LeU
        | Operator::I16x8GeS
        | Operator::I16x8GeU
        | Operator::I16x8Neg
        | Operator::I16x8Abs
        | Operator::I16x8AnyTrue
        | Operator::I16x8AllTrue
        | Operator::I16x8Shl
        | Operator::I16x8ShrS
        | Operator::I16x8ShrU
        | Operator::I16x8Add
        | Operator::I16x8AddSatS
        | Operator::I16x8AddSatU
        | Operator::I16x8Sub
        | Operator::I16x8SubSatS
        | Operator::I16x8SubSatU
        | Operator::I16x8MinS
        | Operator::I16x8MinU
        | Operator::I16x8MaxS
        | Operator::I16x8MaxU
        | Operator::I16x8RoundingAverageU
        | Operator::I16x8Mul
        | Operator::I16x8Bitmask => I16X8,
        Operator::I32x4Splat
        | Operator::V128Load32Splat { .. }
        | Operator::I32x4ExtractLane { .. }
        | Operator::I32x4ReplaceLane { .. }
        | Operator::I32x4Eq
        | Operator::I32x4Ne
        | Operator::I32x4LtS
        | Operator::I32x4LtU
        | Operator::I32x4GtS
        | Operator::I32x4GtU
        | Operator::I32x4LeS
        | Operator::I32x4LeU
        | Operator::I32x4GeS
        | Operator::I32x4GeU
        | Operator::I32x4Neg
        | Operator::I32x4Abs
        | Operator::I32x4AnyTrue
        | Operator::I32x4AllTrue
        | Operator::I32x4Shl
        | Operator::I32x4ShrS
        | Operator::I32x4ShrU
        | Operator::I32x4Add
        | Operator::I32x4Sub
        | Operator::I32x4Mul
        | Operator::I32x4MinS
        | Operator::I32x4MinU
        | Operator::I32x4MaxS
        | Operator::I32x4MaxU
        | Operator::F32x4ConvertI32x4S
        | Operator::F32x4ConvertI32x4U
        | Operator::I32x4Bitmask
        | Operator::V128Load32Zero { .. } => I32X4,
        Operator::I64x2Splat
        | Operator::V128Load64Splat { .. }
        | Operator::I64x2ExtractLane { .. }
        | Operator::I64x2ReplaceLane { .. }
        | Operator::I64x2Neg
        | Operator::I64x2Shl
        | Operator::I64x2ShrS
        | Operator::I64x2ShrU
        | Operator::I64x2Add
        | Operator::I64x2Sub
        | Operator::I64x2Mul
        | Operator::V128Load64Zero { .. } => I64X2,
        Operator::F32x4Splat
        | Operator::F32x4ExtractLane { .. }
        | Operator::F32x4ReplaceLane { .. }
        | Operator::F32x4Eq
        | Operator::F32x4Ne
        | Operator::F32x4Lt
        | Operator::F32x4Gt
        | Operator::F32x4Le
        | Operator::F32x4Ge
        | Operator::F32x4Abs
        | Operator::F32x4Neg
        | Operator::F32x4Sqrt
        | Operator::F32x4Add
        | Operator::F32x4Sub
        | Operator::F32x4Mul
        | Operator::F32x4Div
        | Operator::F32x4Min
        | Operator::F32x4Max
        | Operator::F32x4PMin
        | Operator::F32x4PMax
        | Operator::I32x4TruncSatF32x4S
        | Operator::I32x4TruncSatF32x4U
        | Operator::F32x4Ceil
        | Operator::F32x4Floor
        | Operator::F32x4Trunc
        | Operator::F32x4Nearest => F32X4,
        Operator::F64x2Splat
        | Operator::F64x2ExtractLane { .. }
        | Operator::F64x2ReplaceLane { .. }
        | Operator::F64x2Eq
        | Operator::F64x2Ne
        | Operator::F64x2Lt
        | Operator::F64x2Gt
        | Operator::F64x2Le
        | Operator::F64x2Ge
        | Operator::F64x2Abs
        | Operator::F64x2Neg
        | Operator::F64x2Sqrt
        | Operator::F64x2Add
        | Operator::F64x2Sub
        | Operator::F64x2Mul
        | Operator::F64x2Div
        | Operator::F64x2Min
        | Operator::F64x2Max
        | Operator::F64x2PMin
        | Operator::F64x2PMax
        | Operator::F64x2Ceil
        | Operator::F64x2Floor
        | Operator::F64x2Trunc
        | Operator::F64x2Nearest => F64X2,
        _ => unimplemented!(
            "Currently only SIMD instructions are mapped to their return type; the \
             following instruction is not mapped: {:?}",
            operator
        ),
    }
}
fn type_of ( operator : & Operator ) -> Type { match operator { Operator :: V128Load { .. } | Operator :: V128Store { .. } | Operator :: V128Const { .. } | Operator :: V128Not | Operator :: V128And | Operator :: V128AndNot | Operator :: V128Or | Operator :: V128Xor | Operator :: V128Bitselect => I8X16 , // default type representing V128 Operator :: I8x16Shuffle { .. } | Operator :: I8x16Splat | Operator :: V128Load8Splat { .. } | Operator :: I8x16ExtractLaneS { .. } | Operator :: I8x16ExtractLaneU { .. } | Operator :: I8x16ReplaceLane { .. } | Operator :: I8x16Eq | Operator :: I8x16Ne | Operator :: I8x16LtS | Operator :: I8x16LtU | Operator :: I8x16GtS | Operator :: I8x16GtU | Operator :: I8x16LeS | Operator :: I8x16LeU | Operator :: I8x16GeS | Operator :: I8x16GeU | Operator :: I8x16Neg | Operator :: I8x16Abs | Operator :: I8x16AnyTrue | Operator :: I8x16AllTrue | Operator :: I8x16Shl | Operator :: I8x16ShrS | Operator :: I8x16ShrU | Operator :: I8x16Add | Operator :: I8x16AddSatS | Operator :: I8x16AddSatU | Operator :: I8x16Sub | Operator :: I8x16SubSatS | Operator :: I8x16SubSatU | Operator :: I8x16MinS | Operator :: I8x16MinU | Operator :: I8x16MaxS | Operator :: I8x16MaxU | Operator :: I8x16RoundingAverageU | Operator :: I8x16Bitmask => I8X16 , Operator :: I16x8Splat | Operator :: V128Load16Splat { .. } | Operator :: I16x8ExtractLaneS { .. } | Operator :: I16x8ExtractLaneU { .. } | Operator :: I16x8ReplaceLane { .. } | Operator :: I16x8Eq | Operator :: I16x8Ne | Operator :: I16x8LtS | Operator :: I16x8LtU | Operator :: I16x8GtS | Operator :: I16x8GtU | Operator :: I16x8LeS | Operator :: I16x8LeU | Operator :: I16x8GeS | Operator :: I16x8GeU | Operator :: I16x8Neg | Operator :: I16x8Abs | Operator :: I16x8AnyTrue | Operator :: I16x8AllTrue | Operator :: I16x8Shl | Operator :: I16x8ShrS | Operator :: I16x8ShrU | Operator :: I16x8Add | Operator :: I16x8AddSatS | Operator :: I16x8AddSatU | Operator :: I16x8Sub | Operator :: I16x8SubSatS | Operator :: I16x8SubSatU | Operator :: I16x8MinS | Operator :: I16x8MinU | Operator :: I16x8MaxS | Operator :: I16x8MaxU | Operator :: I16x8RoundingAverageU | Operator :: I16x8Mul | Operator :: I16x8Bitmask => I16X8 , Operator :: I32x4Splat | Operator :: V128Load32Splat { .. } | Operator :: I32x4ExtractLane { .. } | Operator :: I32x4ReplaceLane { .. } | Operator :: I32x4Eq | Operator :: I32x4Ne | Operator :: I32x4LtS | Operator :: I32x4LtU | Operator :: I32x4GtS | Operator :: I32x4GtU | Operator :: I32x4LeS | Operator :: I32x4LeU | Operator :: I32x4GeS | Operator :: I32x4GeU | Operator :: I32x4Neg | Operator :: I32x4Abs | Operator :: I32x4AnyTrue | Operator :: I32x4AllTrue | Operator :: I32x4Shl | Operator :: I32x4ShrS | Operator :: I32x4ShrU | Operator :: I32x4Add | Operator :: I32x4Sub | Operator :: I32x4Mul | Operator :: I32x4MinS | Operator :: I32x4MinU | Operator :: I32x4MaxS | Operator :: I32x4MaxU | Operator :: F32x4ConvertI32x4S | Operator :: F32x4ConvertI32x4U | Operator :: I32x4Bitmask | Operator :: V128Load32Zero { .. } => I32X4 , Operator :: I64x2Splat | Operator :: V128Load64Splat { .. } | Operator :: I64x2ExtractLane { .. } | Operator :: I64x2ReplaceLane { .. } | Operator :: I64x2Neg | Operator :: I64x2Shl | Operator :: I64x2ShrS | Operator :: I64x2ShrU | Operator :: I64x2Add | Operator :: I64x2Sub | Operator :: I64x2Mul | Operator :: V128Load64Zero { .. } => I64X2 , Operator :: F32x4Splat | Operator :: F32x4ExtractLane { .. } | Operator :: F32x4ReplaceLane { .. } | Operator :: F32x4Eq | Operator :: F32x4Ne | Operator :: F32x4Lt | Operator :: F32x4Gt | Operator :: F32x4Le | Operator :: F32x4Ge | Operator :: F32x4Abs | Operator :: F32x4Neg | Operator :: F32x4Sqrt | Operator :: F32x4Add | Operator :: F32x4Sub | Operator :: F32x4Mul | Operator :: F32x4Div | Operator :: F32x4Min | Operator :: F32x4Max | Operator :: F32x4PMin | Operator :: F32x4PMax | Operator :: I32x4TruncSatF32x4S | Operator :: I32x4TruncSatF32x4U | Operator :: F32x4Ceil | Operator :: F32x4Floor | Operator :: F32x4Trunc | Operator :: F32x4Nearest => F32X4 , Operator :: F64x2Splat | Operator :: F64x2ExtractLane { .. } | Operator :: F64x2ReplaceLane { .. } | Operator :: F64x2Eq | Operator :: F64x2Ne | Operator :: F64x2Lt | Operator :: F64x2Gt | Operator :: F64x2Le | Operator :: F64x2Ge | Operator :: F64x2Abs | Operator :: F64x2Neg | Operator :: F64x2Sqrt | Operator :: F64x2Add | Operator :: F64x2Sub | Operator :: F64x2Mul | Operator :: F64x2Div | Operator :: F64x2Min | Operator :: F64x2Max | Operator :: F64x2PMin | Operator :: F64x2PMax | Operator :: F64x2Ceil | Operator :: F64x2Floor | Operator :: F64x2Trunc | Operator :: F64x2Nearest => F64X2 , _ => unimplemented ! ( " \
 " operator ) , } }
Determine the returned value type of a WebAssembly operator
Determine the returned value type of a WebAssembly operator
operator
&Operator
operator
&Operator