@@ -193,11 +193,14 @@ public struct WasmFeatureSet: OptionSet {
193193 /// The WebAssembly threads proposal
194194 @_alwaysEmitIntoClient
195195 public static var threads : WasmFeatureSet { WasmFeatureSet ( rawValue: 1 << 2 ) }
196+ /// The WebAssembly tail-call proposal
197+ @_alwaysEmitIntoClient
198+ public static var tailCall : WasmFeatureSet { WasmFeatureSet ( rawValue: 1 << 3 ) }
196199
197200 /// The default feature set
198201 public static let `default` : WasmFeatureSet = [ . referenceTypes]
199202 /// The feature set with all features enabled
200- public static let all : WasmFeatureSet = [ . memory64, . referenceTypes, . threads]
203+ public static let all : WasmFeatureSet = [ . memory64, . referenceTypes, . threads, . tailCall ]
201204}
202205
203206/// An error that occurs during parsing of a WebAssembly binary
@@ -629,6 +632,16 @@ extension Parser: BinaryInstructionDecoder {
629632 return ( typeIndex, tableIndex)
630633 }
631634
635+ @inlinable mutating func visitReturnCall( ) throws -> UInt32 {
636+ try parseUnsigned ( )
637+ }
638+
639+ @inlinable mutating func visitReturnCallIndirect( ) throws -> ( typeIndex: UInt32 , tableIndex: UInt32 ) {
640+ let typeIndex : TypeIndex = try parseUnsigned ( )
641+ let tableIndex : TableIndex = try parseUnsigned ( )
642+ return ( typeIndex, tableIndex)
643+ }
644+
632645 @inlinable mutating func visitTypedSelect( ) throws -> WasmTypes . ValueType {
633646 let results = try parseVector { try parseValueType ( ) }
634647 guard results. count == 1 else {
0 commit comments