@@ -193,11 +193,14 @@ public struct WasmFeatureSet: OptionSet {
193
193
/// The WebAssembly threads proposal
194
194
@_alwaysEmitIntoClient
195
195
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 ) }
196
199
197
200
/// The default feature set
198
201
public static let `default` : WasmFeatureSet = [ . referenceTypes]
199
202
/// 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 ]
201
204
}
202
205
203
206
/// An error that occurs during parsing of a WebAssembly binary
@@ -629,6 +632,16 @@ extension Parser: BinaryInstructionDecoder {
629
632
return ( typeIndex, tableIndex)
630
633
}
631
634
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
+
632
645
@inlinable mutating func visitTypedSelect( ) throws -> WasmTypes . ValueType {
633
646
let results = try parseVector { try parseValueType ( ) }
634
647
guard results. count == 1 else {
0 commit comments