@@ -187,6 +187,8 @@ public enum Instruction: Equatable {
187
187
case `return`
188
188
case `call`( functionIndex: UInt32 )
189
189
case `callIndirect`( typeIndex: UInt32 , tableIndex: UInt32 )
190
+ case `returnCall`( functionIndex: UInt32 )
191
+ case `returnCallIndirect`( typeIndex: UInt32 , tableIndex: UInt32 )
190
192
case `drop`
191
193
case `select`
192
194
case `typedSelect`( type: ValueType )
@@ -246,6 +248,8 @@ extension AnyInstructionVisitor {
246
248
public mutating func visitReturn( ) throws { return try self . visit ( . return) }
247
249
public mutating func visitCall( functionIndex: UInt32 ) throws { return try self . visit ( . call( functionIndex: functionIndex) ) }
248
250
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) ) }
249
253
public mutating func visitDrop( ) throws { return try self . visit ( . drop) }
250
254
public mutating func visitSelect( ) throws { return try self . visit ( . select) }
251
255
public mutating func visitTypedSelect( type: ValueType ) throws { return try self . visit ( . typedSelect( type: type) ) }
@@ -316,6 +320,10 @@ public protocol InstructionVisitor {
316
320
mutating func visitCall( functionIndex: UInt32 ) throws
317
321
/// Visiting `call_indirect` instruction.
318
322
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
319
327
/// Visiting `drop` instruction.
320
328
mutating func visitDrop( ) throws
321
329
/// Visiting `select` instruction.
@@ -409,6 +417,8 @@ extension InstructionVisitor {
409
417
case . return: return try visitReturn ( )
410
418
case let . call( functionIndex) : return try visitCall ( functionIndex: functionIndex)
411
419
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)
412
422
case . drop: return try visitDrop ( )
413
423
case . select: return try visitSelect ( )
414
424
case let . typedSelect( type) : return try visitTypedSelect ( type: type)
@@ -465,6 +475,8 @@ extension InstructionVisitor {
465
475
public mutating func visitReturn( ) throws { }
466
476
public mutating func visitCall( functionIndex: UInt32 ) throws { }
467
477
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 { }
468
480
public mutating func visitDrop( ) throws { }
469
481
public mutating func visitSelect( ) throws { }
470
482
public mutating func visitTypedSelect( type: ValueType ) throws { }
0 commit comments