@@ -1737,7 +1737,7 @@ struct InstructionTranslator<Context: TranslatorContext>: InstructionVisitor {
1737
1737
emit ( instruction ( storeOperand) )
1738
1738
}
1739
1739
}
1740
-
1740
+
1741
1741
mutating func visitLoad( _ load: WasmParser . Instruction . Load , memarg: MemArg ) throws {
1742
1742
let instruction : ( Instruction . LoadOperand ) -> Instruction
1743
1743
switch load {
@@ -1758,7 +1758,7 @@ struct InstructionTranslator<Context: TranslatorContext>: InstructionVisitor {
1758
1758
}
1759
1759
try visitLoad ( memarg, load. type, load. naturalAlignment, instruction)
1760
1760
}
1761
-
1761
+
1762
1762
mutating func visitStore( _ store: WasmParser . Instruction . Store , memarg: MemArg ) throws {
1763
1763
let instruction : ( Instruction . StoreOperand ) -> Instruction
1764
1764
switch store {
@@ -1860,7 +1860,8 @@ struct InstructionTranslator<Context: TranslatorContext>: InstructionVisitor {
1860
1860
}
1861
1861
}
1862
1862
mutating func visitCmp( _ cmp: WasmParser . Instruction . Cmp ) throws {
1863
- let operand : ValueType , instruction : ( Instruction . BinaryOperand ) -> Instruction
1863
+ let operand : ValueType
1864
+ let instruction : ( Instruction . BinaryOperand ) -> Instruction
1864
1865
switch cmp {
1865
1866
case . i32Eq: ( operand, instruction) = ( . i32, Instruction . i32Eq)
1866
1867
case . i32Ne: ( operand, instruction) = ( . i32, Instruction . i32Ne)
@@ -1898,7 +1899,9 @@ struct InstructionTranslator<Context: TranslatorContext>: InstructionVisitor {
1898
1899
try visitCmp ( operand, instruction)
1899
1900
}
1900
1901
public mutating func visitBinary( _ binary: WasmParser . Instruction . Binary ) throws {
1901
- let operand : ValueType , result : ValueType , instruction : ( Instruction . BinaryOperand ) -> Instruction
1902
+ let operand : ValueType
1903
+ let result : ValueType
1904
+ let instruction : ( Instruction . BinaryOperand ) -> Instruction
1902
1905
switch binary {
1903
1906
case . i32Add: ( operand, result, instruction) = ( . i32, . i32, Instruction . i32Add)
1904
1907
case . i32Sub: ( operand, result, instruction) = ( . i32, . i32, Instruction . i32Sub)
@@ -1945,15 +1948,16 @@ struct InstructionTranslator<Context: TranslatorContext>: InstructionVisitor {
1945
1948
case . f64Max: ( operand, result, instruction) = ( . f64, . f64, Instruction . f64Max)
1946
1949
case . f64Copysign: ( operand, result, instruction) = ( . f64, . f64, Instruction . f64CopySign)
1947
1950
}
1948
- try visitBinary ( operand, result, instruction)
1951
+ try visitBinary ( operand, result, instruction)
1949
1952
}
1950
1953
mutating func visitI64Eqz( ) throws -> Output {
1951
1954
try popPushEmit ( . i64, . i32) { value, result, stack in
1952
1955
. i64Eqz( Instruction . UnaryOperand ( result: LVReg ( result) , input: LVReg ( value) ) )
1953
1956
}
1954
1957
}
1955
1958
mutating func visitUnary( _ unary: WasmParser . Instruction . Unary ) throws {
1956
- let operand : ValueType , instruction : ( Instruction . UnaryOperand ) -> Instruction
1959
+ let operand : ValueType
1960
+ let instruction : ( Instruction . UnaryOperand ) -> Instruction
1957
1961
switch unary {
1958
1962
case . i32Clz: ( operand, instruction) = ( . i32, Instruction . i32Clz)
1959
1963
case . i32Ctz: ( operand, instruction) = ( . i32, Instruction . i32Ctz)
@@ -1984,7 +1988,9 @@ struct InstructionTranslator<Context: TranslatorContext>: InstructionVisitor {
1984
1988
try visitUnary ( operand, instruction)
1985
1989
}
1986
1990
mutating func visitConversion( _ conversion: WasmParser . Instruction . Conversion ) throws {
1987
- let from : ValueType , to : ValueType , instruction : ( Instruction . UnaryOperand ) -> Instruction
1991
+ let from : ValueType
1992
+ let to : ValueType
1993
+ let instruction : ( Instruction . UnaryOperand ) -> Instruction
1988
1994
switch conversion {
1989
1995
case . i32WrapI64: ( from, to, instruction) = ( . i64, . i32, Instruction . i32WrapI64)
1990
1996
case . i32TruncF32S: ( from, to, instruction) = ( . f32, . i32, Instruction . i32TruncF32S)
0 commit comments