Skip to content

Commit a544abe

Browse files
committed
Fix missing atomic store instructions
1 parent 1ea8c2e commit a544abe

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Sources/WasmParser/BinaryInstructionDecoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protocol BinaryInstructionDecoder {
9090
}
9191

9292
@inlinable
93-
func parseBinaryInstruction(visitor: inout some InstructionVisitor & ~Copyable, decoder: inout some BinaryInstructionDecoder) throws -> Bool {
93+
func parseBinaryInstruction(visitor: inout some InstructionVisitor, decoder: inout some BinaryInstructionDecoder) throws -> Bool {
9494
let opcode0 = try decoder.claimNextByte()
9595
switch opcode0 {
9696
case 0x00:

Sources/WasmParser/InstructionVisitor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ public protocol InstructionVisitor: ~Copyable {
420420
mutating func visitUnknown(_ opcode: [UInt8]) throws -> Bool
421421
}
422422

423-
extension InstructionVisitor {
423+
extension InstructionVisitor where Self: ~Copyable {
424424
/// Visits an instruction.
425425
public mutating func visit(_ instruction: Instruction) throws {
426426
switch instruction {

Utilities/Sources/WasmGen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ enum WasmGen {
9595
///
9696
/// The visitor pattern is used while parsing WebAssembly expressions to allow for easy extensibility.
9797
/// See the expression parsing method ``Code/parseExpression(visitor:)``
98-
public protocol InstructionVisitor {
98+
public protocol InstructionVisitor: ~Copyable {
9999
"""
100100

101101
for instruction in instructions.categorized {
@@ -118,7 +118,7 @@ enum WasmGen {
118118
code += """
119119
120120
121-
extension InstructionVisitor {
121+
extension InstructionVisitor where Self: ~Copyable {
122122
/// Visits an instruction.
123123
public mutating func visit(_ instruction: Instruction) throws {
124124
switch instruction {
@@ -150,7 +150,7 @@ enum WasmGen {
150150
code += """
151151
152152
// MARK: - Placeholder implementations
153-
extension InstructionVisitor {
153+
extension InstructionVisitor where Self: ~Copyable {
154154
155155
"""
156156
for instruction in instructions.categorized {

0 commit comments

Comments
 (0)