@@ -187,6 +187,8 @@ public enum Instruction: Equatable {
187187 case `return`
188188 case `call`( functionIndex: UInt32 )
189189 case `callIndirect`( typeIndex: UInt32 , tableIndex: UInt32 )
190+ case `returnCall`( functionIndex: UInt32 )
191+ case `returnCallIndirect`( typeIndex: UInt32 , tableIndex: UInt32 )
190192 case `drop`
191193 case `select`
192194 case `typedSelect`( type: ValueType )
@@ -246,6 +248,8 @@ extension AnyInstructionVisitor {
246248 public mutating func visitReturn( ) throws { return try self . visit ( . return) }
247249 public mutating func visitCall( functionIndex: UInt32 ) throws { return try self . visit ( . call( functionIndex: functionIndex) ) }
248250 public mutating func visitCallIndirect( typeIndex: UInt32 , tableIndex: UInt32 ) throws { return try self . visit ( . callIndirect( typeIndex: typeIndex, tableIndex: tableIndex) ) }
251+ public mutating func visitReturnCall( functionIndex: UInt32 ) throws { return try self . visit ( . returnCall( functionIndex: functionIndex) ) }
252+ public mutating func visitReturnCallIndirect( typeIndex: UInt32 , tableIndex: UInt32 ) throws { return try self . visit ( . returnCallIndirect( typeIndex: typeIndex, tableIndex: tableIndex) ) }
249253 public mutating func visitDrop( ) throws { return try self . visit ( . drop) }
250254 public mutating func visitSelect( ) throws { return try self . visit ( . select) }
251255 public mutating func visitTypedSelect( type: ValueType ) throws { return try self . visit ( . typedSelect( type: type) ) }
@@ -316,6 +320,10 @@ public protocol InstructionVisitor {
316320 mutating func visitCall( functionIndex: UInt32 ) throws
317321 /// Visiting `call_indirect` instruction.
318322 mutating func visitCallIndirect( typeIndex: UInt32 , tableIndex: UInt32 ) throws
323+ /// Visiting `return_call` instruction.
324+ mutating func visitReturnCall( functionIndex: UInt32 ) throws
325+ /// Visiting `return_call_indirect` instruction.
326+ mutating func visitReturnCallIndirect( typeIndex: UInt32 , tableIndex: UInt32 ) throws
319327 /// Visiting `drop` instruction.
320328 mutating func visitDrop( ) throws
321329 /// Visiting `select` instruction.
@@ -409,6 +417,8 @@ extension InstructionVisitor {
409417 case . return: return try visitReturn ( )
410418 case let . call( functionIndex) : return try visitCall ( functionIndex: functionIndex)
411419 case let . callIndirect( typeIndex, tableIndex) : return try visitCallIndirect ( typeIndex: typeIndex, tableIndex: tableIndex)
420+ case let . returnCall( functionIndex) : return try visitReturnCall ( functionIndex: functionIndex)
421+ case let . returnCallIndirect( typeIndex, tableIndex) : return try visitReturnCallIndirect ( typeIndex: typeIndex, tableIndex: tableIndex)
412422 case . drop: return try visitDrop ( )
413423 case . select: return try visitSelect ( )
414424 case let . typedSelect( type) : return try visitTypedSelect ( type: type)
@@ -465,6 +475,8 @@ extension InstructionVisitor {
465475 public mutating func visitReturn( ) throws { }
466476 public mutating func visitCall( functionIndex: UInt32 ) throws { }
467477 public mutating func visitCallIndirect( typeIndex: UInt32 , tableIndex: UInt32 ) throws { }
478+ public mutating func visitReturnCall( functionIndex: UInt32 ) throws { }
479+ public mutating func visitReturnCallIndirect( typeIndex: UInt32 , tableIndex: UInt32 ) throws { }
468480 public mutating func visitDrop( ) throws { }
469481 public mutating func visitSelect( ) throws { }
470482 public mutating func visitTypedSelect( type: ValueType ) throws { }
0 commit comments