aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WebAssembly
diff options
context:
space:
mode:
Diffstat (limited to 'src/WebAssembly')
-rw-r--r--src/WebAssembly/BinaryFormat/Decoder.php100
-rw-r--r--src/WebAssembly/Debug/Debug.php6
-rw-r--r--src/WebAssembly/Execution/Allocator.php4
-rw-r--r--src/WebAssembly/Execution/Linker.php34
-rw-r--r--src/WebAssembly/Execution/MemInst.php202
-rw-r--r--src/WebAssembly/Execution/NumericOps.php130
-rw-r--r--src/WebAssembly/Execution/Runtime.php167
-rw-r--r--src/WebAssembly/Execution/Stack.php20
-rw-r--r--src/WebAssembly/Execution/Store.php2
-rw-r--r--src/WebAssembly/Execution/TrapException.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instr.php197
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/BlockType.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php5
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php7
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/Br.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/BrIf.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/BrTable.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/Call.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/CallIndirect.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/Else_.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/End.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/If_.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/Loop.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/Nop.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/Return_.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Control/Unreachable.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/DataDrop.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Load.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Store.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Load.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Store.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store16.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store8.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store16.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store32.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store8.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryCopy.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryFill.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryGrow.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryInit.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Memory/MemorySize.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Abs.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Add.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ceil.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Const.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32CopySign.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32DemoteF64.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Div.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Eq.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Floor.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ge.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Gt.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Le.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Lt.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Max.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Min.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Mul.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ne.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Nearest.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Neg.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI32.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI64.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sqrt.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sub.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Trunc.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Abs.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Add.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ceil.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Const.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64CopySign.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Div.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Eq.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Floor.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ge.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Gt.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Le.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Lt.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Max.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Min.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Mul.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ne.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Nearest.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Neg.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64PromoteF32.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI32.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI64.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sqrt.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sub.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Trunc.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Add.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32And.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Clz.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Const.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ctz.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eq.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eqz.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend16S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend8S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Mul.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ne.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Or.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Popcnt.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF32.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF64.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotL.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotR.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Shl.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Sub.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32WrapI64.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Xor.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Add.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64And.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Clz.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Const.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ctz.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eq.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eqz.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend16S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend32S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend8S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Mul.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ne.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Or.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Popcnt.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF32.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF64.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotL.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotR.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Shl.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrS.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrU.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Sub.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64S.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64U.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Xor.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Parametric/Drop.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Parametric/Select.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Reference/RefFunc.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Reference/RefIsNull.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Reference/RefNull.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Table/ElemDrop.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Table/TableCopy.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Table/TableFill.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Table/TableGet.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Table/TableGrow.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Table/TableInit.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Table/TableSet.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Table/TableSize.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalGet.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalSet.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalGet.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalSet.php2
-rw-r--r--src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalTee.php2
-rw-r--r--src/WebAssembly/Structure/Types/FuncType.php2
-rw-r--r--src/WebAssembly/Structure/Types/Limits.php2
220 files changed, 733 insertions, 557 deletions
diff --git a/src/WebAssembly/BinaryFormat/Decoder.php b/src/WebAssembly/BinaryFormat/Decoder.php
index 6ab39ff..90b1706 100644
--- a/src/WebAssembly/BinaryFormat/Decoder.php
+++ b/src/WebAssembly/BinaryFormat/Decoder.php
@@ -80,22 +80,22 @@ final class Decoder
$this->skipCustomSections();
- if (!$this->stream->eof()) {
- throw new InvalidBinaryFormatException("eof");
+ if (! $this->stream->eof()) {
+ throw new InvalidBinaryFormatException('eof');
}
if ($dataCount === null) {
foreach ($codes as $code) {
if ($this->countDataIndicesUsedInCode($code) !== 0) {
- throw new InvalidBinaryFormatException("datacount section is required");
+ throw new InvalidBinaryFormatException('datacount section is required');
}
}
} else {
if (count($datas) !== $dataCount) {
- throw new InvalidBinaryFormatException("datasec");
+ throw new InvalidBinaryFormatException('datasec');
}
}
if (count($typeIndices) !== count($codes)) {
- throw new InvalidBinaryFormatException("number of funcs and codes does not match");
+ throw new InvalidBinaryFormatException('number of funcs and codes does not match');
}
$funcs = [];
@@ -134,7 +134,7 @@ final class Decoder
$b3 = ord($bs[2]);
$b4 = ord($bs[3]);
if ([$b1, $b2, $b3, $b4] !== [0x00, 0x61, 0x73, 0x6D]) {
- throw new InvalidBinaryFormatException("magic");
+ throw new InvalidBinaryFormatException('magic');
}
}
@@ -146,7 +146,7 @@ final class Decoder
$b3 = ord($bs[2]);
$b4 = ord($bs[3]);
if ([$b1, $b2, $b3, $b4] !== [0x01, 0x00, 0x00, 0x00]) {
- throw new InvalidBinaryFormatException(sprintf("version: [%x, %x, %x, %x]", $b1, $b2, $b3, $b4));
+ throw new InvalidBinaryFormatException(sprintf('version: [%x, %x, %x, %x]', $b1, $b2, $b3, $b4));
}
}
@@ -165,7 +165,7 @@ final class Decoder
$idValue = $this->stream->peekByte();
$id = SectionId::tryFrom($idValue);
if ($id === null) {
- throw new InvalidBinaryFormatException("section id");
+ throw new InvalidBinaryFormatException('section id');
}
if ($id !== $sectionId) {
return null;
@@ -176,14 +176,14 @@ final class Decoder
$prevPos = $this->stream->tell();
$result = $decoder();
if ($this->stream->tell() - $prevPos !== $size) {
- throw new InvalidBinaryFormatException("type section size");
+ throw new InvalidBinaryFormatException('type section size');
}
return $result;
}
private function skipCustomSections(): void
{
- while (!$this->stream->eof()) {
+ while (! $this->stream->eof()) {
$b = $this->stream->peekByte();
if ($b !== SectionId::Custom->value) {
break;
@@ -195,7 +195,7 @@ final class Decoder
$encodedSizeOfName = $this->stream->tell() - $prevPos;
$offset = $size - $encodedSizeOfName;
if ($offset < 0) {
- throw new InvalidBinaryFormatException("custom section size");
+ throw new InvalidBinaryFormatException('custom section size');
}
if ($offset !== 0) {
$this->stream->seek($offset);
@@ -308,7 +308,7 @@ final class Decoder
{
$b = $this->decodeByte();
if ($b !== 0x60) {
- throw new InvalidBinaryFormatException("functype");
+ throw new InvalidBinaryFormatException('functype');
}
$params = $this->decodeResultType();
$results = $this->decodeResultType();
@@ -329,7 +329,7 @@ final class Decoder
0x7B => ValType::V128,
0x70 => ValType::FuncRef,
0x6F => ValType::ExternRef,
- default => throw new InvalidBinaryFormatException("valtype $b"),
+ default => throw new InvalidBinaryFormatException("valtype {$b}"),
};
}
@@ -341,7 +341,7 @@ final class Decoder
$type = $this->decodeValType();
return match ($type) {
ValType::FuncRef, ValType::ExternRef => $type,
- default => throw new InvalidBinaryFormatException("reftype"),
+ default => throw new InvalidBinaryFormatException('reftype'),
};
}
@@ -355,9 +355,8 @@ final class Decoder
$min = $this->decodeU32();
$max = $this->decodeU32();
return new Limits($min, $max);
- } else {
- throw new InvalidBinaryFormatException("limits");
}
+ throw new InvalidBinaryFormatException('limits');
}
private function decodeMemType(): MemType
@@ -390,7 +389,7 @@ final class Decoder
return match ($this->decodeByte()) {
0x00 => Mut::Const,
0x01 => Mut::Var,
- default => throw new InvalidBinaryFormatException("mutability"),
+ default => throw new InvalidBinaryFormatException('mutability'),
};
}
@@ -519,9 +518,8 @@ final class Decoder
$init,
ElemMode::Declarative(),
);
- } else {
- throw new InvalidBinaryFormatException("code");
}
+ throw new InvalidBinaryFormatException('code');
}
private function decodeCode(): Code
@@ -531,7 +529,7 @@ final class Decoder
$compressedLocals = $this->decodeVec($this->decodeLocals(...));
$body = $this->decodeExpr();
if ($this->stream->tell() - $prevPos !== $size) {
- throw new InvalidBinaryFormatException("code size");
+ throw new InvalidBinaryFormatException('code size');
}
return new Code(
$compressedLocals,
@@ -569,9 +567,8 @@ final class Decoder
$offset,
),
);
- } else {
- throw new InvalidBinaryFormatException("data");
}
+ throw new InvalidBinaryFormatException('data');
}
private function decodeImportDesc(): ImportDesc
@@ -581,7 +578,7 @@ final class Decoder
0x01 => ImportDesc::Table($this->decodeTableType()),
0x02 => ImportDesc::Mem($this->decodeMemType()),
0x03 => ImportDesc::Global($this->decodeGlobalType()),
- default => throw new InvalidBinaryFormatException("importdesc"),
+ default => throw new InvalidBinaryFormatException('importdesc'),
};
}
@@ -592,7 +589,7 @@ final class Decoder
0x01 => ExportDesc::Table($this->decodeTableIdx()),
0x02 => ExportDesc::Mem($this->decodeMemIdx()),
0x03 => ExportDesc::Global($this->decodeGlobalIdx()),
- default => throw new InvalidBinaryFormatException("exportdesc"),
+ default => throw new InvalidBinaryFormatException('exportdesc'),
};
}
@@ -604,17 +601,16 @@ final class Decoder
$b = $this->decodeByte();
if ($b === 0x00) {
return ValType::FuncRef;
- } else {
- throw new InvalidBinaryFormatException("elemkind");
}
+ throw new InvalidBinaryFormatException('elemkind');
}
private function decodeLocals(): Locals
{
$count = $this->decodeU32();
// @todo Provide a way to configure the limit.
- if (1056 < $count) {
- throw new InvalidBinaryFormatException("too many local variables");
+ if ($count > 1056) {
+ throw new InvalidBinaryFormatException('too many local variables');
}
$type = $this->decodeValType();
return new Locals(
@@ -754,13 +750,13 @@ final class Decoder
case 0x3F:
$c = $this->decodeByte();
if ($c !== 0) {
- throw new InvalidBinaryFormatException("Unexpected value while decoding an instruction `memory.size`, expected 0, but got $c");
+ throw new InvalidBinaryFormatException("Unexpected value while decoding an instruction `memory.size`, expected 0, but got {$c}");
}
return Instr::MemorySize();
case 0x40:
$c = $this->decodeByte();
if ($c !== 0) {
- throw new InvalidBinaryFormatException("Unexpected value while decoding an instruction `memory.grow`, expected 0, but got $c");
+ throw new InvalidBinaryFormatException("Unexpected value while decoding an instruction `memory.grow`, expected 0, but got {$c}");
}
return Instr::MemoryGrow();
case 0x41: return Instr::I32Const($this->decodeS32());
@@ -911,21 +907,21 @@ final class Decoder
case 8:
$data = $this->decodeDataIdx();
if ($this->decodeByte() !== 0) {
- throw new InvalidBinaryFormatException("memory init");
+ throw new InvalidBinaryFormatException('memory init');
}
return Instr::MemoryInit($data);
case 9: return Instr::DataDrop($this->decodeDataIdx());
case 10:
if ($this->decodeByte() !== 0) {
- throw new InvalidBinaryFormatException("memory copy");
+ throw new InvalidBinaryFormatException('memory copy');
}
if ($this->decodeByte() !== 0) {
- throw new InvalidBinaryFormatException("memory copy");
+ throw new InvalidBinaryFormatException('memory copy');
}
return Instr::MemoryCopy();
case 11:
if ($this->decodeByte() !== 0) {
- throw new InvalidBinaryFormatException("memory fill");
+ throw new InvalidBinaryFormatException('memory fill');
}
return Instr::MemoryFill();
case 12:
@@ -941,11 +937,11 @@ final class Decoder
case 16: return Instr::TableSize($this->decodeTableIdx());
case 17: return Instr::TableFill($this->decodeTableIdx());
default:
- throw new InvalidBinaryFormatException("instr");
+ throw new InvalidBinaryFormatException('instr');
}
// no break
default:
- throw new InvalidBinaryFormatException("Unexpected opcode $op while decoding an instruction");
+ throw new InvalidBinaryFormatException("Unexpected opcode {$op} while decoding an instruction");
}
}
@@ -967,13 +963,12 @@ final class Decoder
return BlockType::ValType(null);
} elseif (in_array($b, [0x7F, 0x7E, 0x7D, 0x7C, 0x7B, 0x70, 0x6F], true)) {
return BlockType::ValType($this->decodeValType());
- } else {
- $type = $this->decodeS33();
- if ($type < 0) {
- throw new InvalidBinaryFormatException("blocktype");
- }
- return BlockType::TypeIdx($type);
}
+ $type = $this->decodeS33();
+ if ($type < 0) {
+ throw new InvalidBinaryFormatException('blocktype');
+ }
+ return BlockType::TypeIdx($type);
}
/**
@@ -1028,7 +1023,7 @@ final class Decoder
$leftBitsCount = $maxBits - $shiftBits;
if ($leftBitsCount < 7) {
if ((($b & 0b01111111) >> $leftBitsCount) !== 0) {
- throw new InvalidBinaryFormatException("unsigned leb128 ($maxBits): too large");
+ throw new InvalidBinaryFormatException("unsigned leb128 ({$maxBits}): too large");
}
}
$result |= ($b & 0b01111111) << $shiftBits;
@@ -1036,7 +1031,7 @@ final class Decoder
return $result;
}
}
- throw new InvalidBinaryFormatException("unsigned leb128 ($maxBits): too large");
+ throw new InvalidBinaryFormatException("unsigned leb128 ({$maxBits}): too large");
}
private function decodeSignedLeb128(int $maxBits): int
@@ -1048,11 +1043,11 @@ final class Decoder
if ($leftBitsCount < 7) {
if (($b & (1 << ($leftBitsCount - 1))) === 0) {
if ((($b & 0b01111111) >> $leftBitsCount) !== 0) {
- throw new InvalidBinaryFormatException("signed leb128 ($maxBits): too large");
+ throw new InvalidBinaryFormatException("signed leb128 ({$maxBits}): too large");
}
} else {
if ((($b & 0b01111111) >> $leftBitsCount) + 1 !== (1 << (7 - $leftBitsCount))) {
- throw new InvalidBinaryFormatException("signed leb128 ($maxBits): too large");
+ throw new InvalidBinaryFormatException("signed leb128 ({$maxBits}): too large");
}
}
}
@@ -1060,12 +1055,11 @@ final class Decoder
if (($b & 0b10000000) === 0) {
if (($b & 0b01000000) === 0) {
return $result;
- } else {
- return $result | (~0 << ($shiftBits + 7));
}
+ return $result | (~0 << ($shiftBits + 7));
}
}
- throw new InvalidBinaryFormatException("signed leb128 ($maxBits): too large");
+ throw new InvalidBinaryFormatException("signed leb128 ({$maxBits}): too large");
}
/**
@@ -1116,7 +1110,7 @@ final class Decoder
$bytes = $this->decodeVec($this->decodeByte(...));
$name = $this->implodeUtf8BytesToString($bytes);
if ($name === null) {
- throw new InvalidBinaryFormatException("name");
+ throw new InvalidBinaryFormatException('name');
}
return $name;
}
@@ -1145,7 +1139,7 @@ final class Decoder
0,
);
assert(is_int($result), '$result is guaranteed not to exceed the maximum value of an integer because the number of instructions in $code is limited');
- assert(0 <= $result, '$result is guaranteed to be non-negative because it is the sum of non-negative integers');
+ assert($result >= 0, '$result is guaranteed to be non-negative because it is the sum of non-negative integers');
return $result;
}
@@ -1182,8 +1176,8 @@ final class Decoder
// Not a memory operation.
default => true,
};
- if (!$isValid) {
- throw new InvalidBinaryFormatException("malformed memop flags");
+ if (! $isValid) {
+ throw new InvalidBinaryFormatException('malformed memop flags');
}
}
}
diff --git a/src/WebAssembly/Debug/Debug.php b/src/WebAssembly/Debug/Debug.php
index 99eefb0..a906b6c 100644
--- a/src/WebAssembly/Debug/Debug.php
+++ b/src/WebAssembly/Debug/Debug.php
@@ -36,7 +36,7 @@ final readonly class Debug
ImportDescs\Global_::class => self::globalTypeToString($desc->global),
default => 'unknown',
};
- echo "$mod::$name: $type $extraInfo\n";
+ echo "{$mod}::{$name}: {$type} {$extraInfo}\n";
}
}
@@ -65,7 +65,7 @@ final readonly class Debug
{
$params = implode(', ', array_map(self::valTypeToString(...), $type->params));
$results = implode(', ', array_map(self::valTypeToString(...), $type->results));
- return "($params) -> ($results)";
+ return "({$params}) -> ({$results})";
}
private static function valTypeToString(ValType $type): string
@@ -85,7 +85,7 @@ final readonly class Debug
{
$min = $limit->min;
$max = $limit->max;
- return $max === null ? "[$min, inf)" : "[$min, $max]";
+ return $max === null ? "[{$min}, inf)" : "[{$min}, {$max}]";
}
private static function mutToString(Mut $mut): string
diff --git a/src/WebAssembly/Execution/Allocator.php b/src/WebAssembly/Execution/Allocator.php
index 79f8679..a84abd3 100644
--- a/src/WebAssembly/Execution/Allocator.php
+++ b/src/WebAssembly/Execution/Allocator.php
@@ -66,7 +66,7 @@ final readonly class Allocator
ExternVals\Table::class => $m->tableAddrs[] = $externVal->addr,
ExternVals\Mem::class => $m->memAddrs[] = $externVal->addr,
ExternVals\Global_::class => $m->globalAddrs[] = $externVal->addr,
- default => throw new RuntimeException("unreachable"),
+ default => throw new RuntimeException('unreachable'),
};
}
@@ -104,7 +104,7 @@ final readonly class Allocator
ExportDescs\Table::class => ExternVal::Table($m->tableAddrs[$export->desc->table]),
ExportDescs\Mem::class => ExternVal::Mem($m->memAddrs[$export->desc->mem]),
ExportDescs\Global_::class => ExternVal::Global_($m->globalAddrs[$export->desc->global]),
- default => throw new RuntimeException("unreachable"),
+ default => throw new RuntimeException('unreachable'),
};
$m->exports[] = new ExportInst($export->name, $value);
}
diff --git a/src/WebAssembly/Execution/Linker.php b/src/WebAssembly/Execution/Linker.php
index 232d924..e5321e1 100644
--- a/src/WebAssembly/Execution/Linker.php
+++ b/src/WebAssembly/Execution/Linker.php
@@ -61,51 +61,51 @@ final class Linker
{
switch ($import->desc::class) {
case ImportDescs\Func::class:
- if (!$externVal instanceof ExternVals\Func) {
- throw new LinkErrorException("incompatible import type: expected function, got " . $externVal::class);
+ if (! $externVal instanceof ExternVals\Func) {
+ throw new LinkErrorException('incompatible import type: expected function, got ' . $externVal::class);
}
$expectedType = $module->types[$import->desc->func];
$actualFunc = $this->store->funcs[$externVal->addr];
$actualType = match (true) {
$actualFunc instanceof FuncInsts\Wasm => $actualFunc->type,
$actualFunc instanceof FuncInsts\Host => $actualFunc->type,
- default => throw new LinkErrorException("unknown function instance type"),
+ default => throw new LinkErrorException('unknown function instance type'),
};
- if (!$this->functionsTypesMatch($expectedType, $actualType)) {
- throw new LinkErrorException("incompatible import type: function signature mismatch");
+ if (! $this->functionsTypesMatch($expectedType, $actualType)) {
+ throw new LinkErrorException('incompatible import type: function signature mismatch');
}
break;
case ImportDescs\Global_::class:
- if (!$externVal instanceof ExternVals\Global_) {
- throw new LinkErrorException("incompatible import type: expected global, got " . $externVal::class);
+ if (! $externVal instanceof ExternVals\Global_) {
+ throw new LinkErrorException('incompatible import type: expected global, got ' . $externVal::class);
}
$expectedType = $import->desc->global;
$actualGlobal = $this->store->globals[$externVal->addr];
- if (!$this->globalTypesMatch($expectedType, $actualGlobal->type)) {
- throw new LinkErrorException("incompatible import type: global type mismatch");
+ if (! $this->globalTypesMatch($expectedType, $actualGlobal->type)) {
+ throw new LinkErrorException('incompatible import type: global type mismatch');
}
break;
case ImportDescs\Table::class:
- if (!$externVal instanceof ExternVals\Table) {
- throw new LinkErrorException("incompatible import type: expected table, got " . $externVal::class);
+ if (! $externVal instanceof ExternVals\Table) {
+ throw new LinkErrorException('incompatible import type: expected table, got ' . $externVal::class);
}
$expectedType = $import->desc->table;
$actualTable = $this->store->tables[$externVal->addr];
- if (!$this->tableTypesMatch($expectedType, $actualTable->type)) {
- throw new LinkErrorException("incompatible import type: table type mismatch");
+ if (! $this->tableTypesMatch($expectedType, $actualTable->type)) {
+ throw new LinkErrorException('incompatible import type: table type mismatch');
}
break;
case ImportDescs\Mem::class:
- if (!$externVal instanceof ExternVals\Mem) {
- throw new LinkErrorException("incompatible import type: expected memory, got " . $externVal::class);
+ if (! $externVal instanceof ExternVals\Mem) {
+ throw new LinkErrorException('incompatible import type: expected memory, got ' . $externVal::class);
}
$expectedType = $import->desc->mem;
$actualMem = $this->store->mems[$externVal->addr];
- if (!$this->memTypesMatch($expectedType, $actualMem->type)) {
- throw new LinkErrorException("incompatible import type: memory type mismatch");
+ if (! $this->memTypesMatch($expectedType, $actualMem->type)) {
+ throw new LinkErrorException('incompatible import type: memory type mismatch');
}
break;
}
diff --git a/src/WebAssembly/Execution/MemInst.php b/src/WebAssembly/Execution/MemInst.php
index f5733e6..79ff854 100644
--- a/src/WebAssembly/Execution/MemInst.php
+++ b/src/WebAssembly/Execution/MemInst.php
@@ -19,38 +19,63 @@ final class MemInst
private const MAX_PAGES = 0x10000;
private CData $dataU8;
+
private CData $dataS8;
private CData $dataU16_0;
+
private CData $dataU16_1;
+
private CData $dataS16_0;
+
private CData $dataS16_1;
private CData $dataU32_0;
+
private CData $dataU32_1;
+
private CData $dataU32_2;
+
private CData $dataU32_3;
+
private CData $dataS32_0;
+
private CData $dataS32_1;
+
private CData $dataS32_2;
+
private CData $dataS32_3;
private CData $dataS64_0;
+
private CData $dataS64_1;
+
private CData $dataS64_2;
+
private CData $dataS64_3;
+
private CData $dataS64_4;
+
private CData $dataS64_5;
+
private CData $dataS64_6;
+
private CData $dataS64_7;
private CData $dataF64_0;
+
private CData $dataF64_1;
+
private CData $dataF64_2;
+
private CData $dataF64_3;
+
private CData $dataF64_4;
+
private CData $dataF64_5;
+
private CData $dataF64_6;
+
private CData $dataF64_7;
private int $dataSize;
@@ -82,19 +107,19 @@ final class MemInst
{
$sz = $this->nPages();
$len = $sz + $n;
- if (self::MAX_PAGES < $len) {
+ if ($len > self::MAX_PAGES) {
return -1;
}
$limits = new Limits($len, $this->type->limits->max);
- if (!$limits->isValid()) {
+ if (! $limits->isValid()) {
return -1;
}
$this->type = new MemType($limits);
$originalSize = $this->size();
// @phpstan-ignore-next-line
- $originalData = $this->ffi->new("uint8_t[$originalSize+8]");
+ $originalData = $this->ffi->new("uint8_t[{$originalSize}+8]");
FFI::memcpy($originalData, $this->dataU8, $originalSize);
$this->initInternalMemory($len);
@@ -104,72 +129,14 @@ final class MemInst
return $sz;
}
- private function initInternalMemory(int $n): void
- {
- $this->dataSize = $n * self::PAGE_SIZE;
-
- // @phpstan-ignore-next-line
- $this->dataU8 = $this->ffi->new("uint8_t[$this->dataSize+8]");
- // @phpstan-ignore-next-line
- $this->dataS8 = $this->ffi->cast("int8_t[$this->dataSize]", $this->dataU8);
-
- // @phpstan-ignore-next-line
- $castInt = fn (int $n, bool $signed, int $offset) => $this->ffi->cast(
- sprintf("%sint%d_t[$this->dataSize/%d]", $signed ? "" : "u", $n, $n / 8),
- // @phpstan-ignore-next-line
- $this->ffi->cast("uint8_t[$this->dataSize+8]", $this->dataU8 + $offset),
- );
-
- // @phpstan-ignore-next-line
- $castFloat = fn (int $n, int $offset) => $this->ffi->cast(
- sprintf("%s[$this->dataSize/%d]", $n === 32 ? "float" : "double", $n / 8),
- // @phpstan-ignore-next-line
- $this->ffi->cast("uint8_t[$this->dataSize+8]", $this->dataU8 + $offset),
- );
-
- $this->dataU16_0 = $castInt(16, false, 0);
- $this->dataU16_1 = $castInt(16, false, 1);
- $this->dataS16_0 = $castInt(16, true, 0);
- $this->dataS16_1 = $castInt(16, true, 1);
-
- $this->dataU32_0 = $castInt(32, false, 0);
- $this->dataU32_1 = $castInt(32, false, 1);
- $this->dataU32_2 = $castInt(32, false, 2);
- $this->dataU32_3 = $castInt(32, false, 3);
- $this->dataS32_0 = $castInt(32, true, 0);
- $this->dataS32_1 = $castInt(32, true, 1);
- $this->dataS32_2 = $castInt(32, true, 2);
- $this->dataS32_3 = $castInt(32, true, 3);
-
- $this->dataS64_0 = $castInt(64, true, 0);
- $this->dataS64_1 = $castInt(64, true, 1);
- $this->dataS64_2 = $castInt(64, true, 2);
- $this->dataS64_3 = $castInt(64, true, 3);
- $this->dataS64_4 = $castInt(64, true, 4);
- $this->dataS64_5 = $castInt(64, true, 5);
- $this->dataS64_6 = $castInt(64, true, 6);
- $this->dataS64_7 = $castInt(64, true, 7);
-
- $this->dataF64_0 = $castFloat(64, 0);
- $this->dataF64_1 = $castFloat(64, 1);
- $this->dataF64_2 = $castFloat(64, 2);
- $this->dataF64_3 = $castFloat(64, 3);
- $this->dataF64_4 = $castFloat(64, 4);
- $this->dataF64_5 = $castFloat(64, 5);
- $this->dataF64_6 = $castFloat(64, 6);
- $this->dataF64_7 = $castFloat(64, 7);
-
- FFI::memset($this->dataU8, 0, $this->dataSize);
- }
-
/**
* @param list<int> $data
*/
public function copyData(array $data, int $src, int $dst, int $len): void
{
- assert(0 <= $len);
- assert(0 <= $src);
- assert(0 <= $dst);
+ assert($len >= 0);
+ assert($src >= 0);
+ assert($dst >= 0);
assert($src + $len <= count($data));
assert($dst + $len <= $this->size());
for ($i = 0; $i < $len; $i++) {
@@ -179,9 +146,9 @@ final class MemInst
public function memcpy(int $dst, int $src, int $len): void
{
- assert(0 <= $len);
- assert(0 <= $src);
- assert(0 <= $dst);
+ assert($len >= 0);
+ assert($src >= 0);
+ assert($dst >= 0);
assert($src + $len <= $this->size());
assert($dst + $len <= $this->size());
if ($src === $dst || $len === 0) {
@@ -198,8 +165,8 @@ final class MemInst
public function memset(int $dst, int $c, int $len): void
{
- assert(0 <= $len);
- assert(0 <= $dst);
+ assert($len >= 0);
+ assert($dst >= 0);
assert($dst + $len <= $this->size());
for ($i = 0; $i < $len; $i++) {
$this->storeI32_s8($dst + $i, $c);
@@ -216,7 +183,7 @@ final class MemInst
}
/** @var S8 $c */
$c = $this->dataS8[$ptr];
- assert(-0x80 <= $c && $c <= 0x7F, "$c");
+ assert($c >= -0x80 && $c <= 0x7F, "{$c}");
return $c;
}
@@ -230,7 +197,7 @@ final class MemInst
}
/** @var U8 $c */
$c = $this->dataU8[$ptr];
- assert(0 <= $c && $c <= 0xFF, "$c");
+ assert($c >= 0 && $c <= 0xFF, "{$c}");
return $c;
}
@@ -244,7 +211,7 @@ final class MemInst
}
/** @var S16 $c */
$c = $this->dataS16($ptr)[$ptr >> 1];
- assert(-0x8000 <= $c && $c <= 0x7FFF, "$c");
+ assert($c >= -0x8000 && $c <= 0x7FFF, "{$c}");
return $c;
}
@@ -258,7 +225,7 @@ final class MemInst
}
/** @var U16 $c */
$c = $this->dataU16($ptr)[$ptr >> 1];
- assert(0 <= $c && $c <= 0xFFFF, "$c");
+ assert($c >= 0 && $c <= 0xFFFF, "{$c}");
return $c;
}
@@ -272,7 +239,7 @@ final class MemInst
}
/** @var S32 $c */
$c = $this->dataS32($ptr)[$ptr >> 2];
- assert(-0x80000000 <= $c && $c <= 0x7FFFFFFF, "$c");
+ assert($c >= -0x80000000 && $c <= 0x7FFFFFFF, "{$c}");
return $c;
}
@@ -286,7 +253,7 @@ final class MemInst
}
/** @var S8 $c */
$c = $this->dataS8[$ptr];
- assert(-0x80 <= $c && $c <= 0x7F, "$c");
+ assert($c >= -0x80 && $c <= 0x7F, "{$c}");
return $c;
}
@@ -300,7 +267,7 @@ final class MemInst
}
/** @var U8 $c */
$c = $this->dataU8[$ptr];
- assert(0 <= $c && $c <= 0xFF, "$c");
+ assert($c >= 0 && $c <= 0xFF, "{$c}");
return $c;
}
@@ -314,7 +281,7 @@ final class MemInst
}
/** @var S16 $c */
$c = $this->dataS16($ptr)[$ptr >> 1];
- assert(-0x8000 <= $c && $c <= 0x7FFF, "$c");
+ assert($c >= -0x8000 && $c <= 0x7FFF, "{$c}");
return $c;
}
@@ -328,7 +295,7 @@ final class MemInst
}
/** @var U16 $c */
$c = $this->dataU16($ptr)[$ptr >> 1];
- assert(0 <= $c && $c <= 0xFFFF, "$c");
+ assert($c >= 0 && $c <= 0xFFFF, "{$c}");
return $c;
}
@@ -342,7 +309,7 @@ final class MemInst
}
/** @var S32 $c */
$c = $this->dataS32($ptr)[$ptr >> 2];
- assert(-0x80000000 <= $c && $c <= 0x7FFFFFFF, "$c");
+ assert($c >= -0x80000000 && $c <= 0x7FFFFFFF, "{$c}");
return $c;
}
@@ -356,7 +323,7 @@ final class MemInst
}
/** @var U32 $c */
$c = $this->dataU32($ptr)[$ptr >> 2];
- assert(0 <= $c && $c <= 0xFFFFFFFF, "$c");
+ assert($c >= 0 && $c <= 0xFFFFFFFF, "{$c}");
return $c;
}
@@ -370,7 +337,7 @@ final class MemInst
}
/** @var S64 $c */
$c = $this->dataS64($ptr)[$ptr >> 3];
- assert(-0x8000000000000000 <= $c && $c <= 0x7FFFFFFFFFFFFFFF, "$c");
+ assert($c >= -0x8000000000000000 && $c <= 0x7FFFFFFFFFFFFFFF, "{$c}");
return $c;
}
@@ -402,9 +369,6 @@ final class MemInst
return $x;
}
- /**
- * @return ?int
- */
public function loadByte(int $ptr): ?int
{
if ($this->size() < $ptr + 1) {
@@ -415,9 +379,6 @@ final class MemInst
return $c;
}
- /**
- * @return bool
- */
public function storeByte(int $ptr, int $c): bool
{
if ($this->size() < $ptr + 1) {
@@ -429,7 +390,6 @@ final class MemInst
/**
* @param S32 $c
- * @return bool
*/
public function storeI32_s8(int $ptr, int $c): bool
{
@@ -442,7 +402,6 @@ final class MemInst
/**
* @param S32 $c
- * @return bool
*/
public function storeI32_s16(int $ptr, int $c): bool
{
@@ -455,7 +414,6 @@ final class MemInst
/**
* @param S32 $c
- * @return bool
*/
public function storeI32_s32(int $ptr, int $c): bool
{
@@ -468,7 +426,6 @@ final class MemInst
/**
* @param S64 $c
- * @return bool
*/
public function storeI64_s8(int $ptr, int $c): bool
{
@@ -481,7 +438,6 @@ final class MemInst
/**
* @param S64 $c
- * @return bool
*/
public function storeI64_s16(int $ptr, int $c): bool
{
@@ -494,7 +450,6 @@ final class MemInst
/**
* @param S64 $c
- * @return bool
*/
public function storeI64_s32(int $ptr, int $c): bool
{
@@ -507,7 +462,6 @@ final class MemInst
/**
* @param S64 $c
- * @return bool
*/
public function storeI64_s64(int $ptr, int $c): bool
{
@@ -520,7 +474,6 @@ final class MemInst
/**
* @param F32 $c
- * @return bool
*/
public function storeF32(int $ptr, float $c): bool
{
@@ -535,7 +488,6 @@ final class MemInst
/**
* @param F64 $c
- * @return bool
*/
public function storeF64(int $ptr, float $c): bool
{
@@ -546,6 +498,64 @@ final class MemInst
return true;
}
+ private function initInternalMemory(int $n): void
+ {
+ $this->dataSize = $n * self::PAGE_SIZE;
+
+ // @phpstan-ignore-next-line
+ $this->dataU8 = $this->ffi->new("uint8_t[{$this->dataSize}+8]");
+ // @phpstan-ignore-next-line
+ $this->dataS8 = $this->ffi->cast("int8_t[{$this->dataSize}]", $this->dataU8);
+
+ // @phpstan-ignore-next-line
+ $castInt = fn (int $n, bool $signed, int $offset) => $this->ffi->cast(
+ sprintf("%sint%d_t[{$this->dataSize}/%d]", $signed ? '' : 'u', $n, $n / 8),
+ // @phpstan-ignore-next-line
+ $this->ffi->cast("uint8_t[{$this->dataSize}+8]", $this->dataU8 + $offset),
+ );
+
+ // @phpstan-ignore-next-line
+ $castFloat = fn (int $n, int $offset) => $this->ffi->cast(
+ sprintf("%s[{$this->dataSize}/%d]", $n === 32 ? 'float' : 'double', $n / 8),
+ // @phpstan-ignore-next-line
+ $this->ffi->cast("uint8_t[{$this->dataSize}+8]", $this->dataU8 + $offset),
+ );
+
+ $this->dataU16_0 = $castInt(16, false, 0);
+ $this->dataU16_1 = $castInt(16, false, 1);
+ $this->dataS16_0 = $castInt(16, true, 0);
+ $this->dataS16_1 = $castInt(16, true, 1);
+
+ $this->dataU32_0 = $castInt(32, false, 0);
+ $this->dataU32_1 = $castInt(32, false, 1);
+ $this->dataU32_2 = $castInt(32, false, 2);
+ $this->dataU32_3 = $castInt(32, false, 3);
+ $this->dataS32_0 = $castInt(32, true, 0);
+ $this->dataS32_1 = $castInt(32, true, 1);
+ $this->dataS32_2 = $castInt(32, true, 2);
+ $this->dataS32_3 = $castInt(32, true, 3);
+
+ $this->dataS64_0 = $castInt(64, true, 0);
+ $this->dataS64_1 = $castInt(64, true, 1);
+ $this->dataS64_2 = $castInt(64, true, 2);
+ $this->dataS64_3 = $castInt(64, true, 3);
+ $this->dataS64_4 = $castInt(64, true, 4);
+ $this->dataS64_5 = $castInt(64, true, 5);
+ $this->dataS64_6 = $castInt(64, true, 6);
+ $this->dataS64_7 = $castInt(64, true, 7);
+
+ $this->dataF64_0 = $castFloat(64, 0);
+ $this->dataF64_1 = $castFloat(64, 1);
+ $this->dataF64_2 = $castFloat(64, 2);
+ $this->dataF64_3 = $castFloat(64, 3);
+ $this->dataF64_4 = $castFloat(64, 4);
+ $this->dataF64_5 = $castFloat(64, 5);
+ $this->dataF64_6 = $castFloat(64, 6);
+ $this->dataF64_7 = $castFloat(64, 7);
+
+ FFI::memset($this->dataU8, 0, $this->dataSize);
+ }
+
private function dataU16(int $ptr): CData
{
return ($ptr & 1) !== 0 ? $this->dataU16_1 : $this->dataU16_0;
diff --git a/src/WebAssembly/Execution/NumericOps.php b/src/WebAssembly/Execution/NumericOps.php
index 7d5e57c..fc79ad4 100644
--- a/src/WebAssembly/Execution/NumericOps.php
+++ b/src/WebAssembly/Execution/NumericOps.php
@@ -69,7 +69,7 @@ final readonly class NumericOps
public static function f32ConvertI64S(int $x): float
{
- return BinaryConversion::convertBigIntToF32((string)$x);
+ return BinaryConversion::convertBigIntToF32((string) $x);
}
public static function f32ConvertI64U(int $x): float
@@ -89,9 +89,8 @@ final readonly class NumericOps
{
if (is_nan($x)) {
return NAN;
- } else {
- return self::truncateF64ToF32($x);
}
+ return self::truncateF64ToF32($x);
}
public static function f32Div(float $x, float $y): float
@@ -173,9 +172,8 @@ final readonly class NumericOps
if (is_nan($x)) {
// Negate operator does not work for NaN in PHP.
return FloatOps::constructNan(FloatOps::getSignedness($x)->negated(), $x);
- } else {
- return -$x;
}
+ return -$x;
}
public static function f32ReinterpretI32(int $x): float
@@ -205,9 +203,8 @@ final readonly class NumericOps
}
if ($x < 0) {
return self::truncateF64ToF32(ceil($x));
- } else {
- return self::truncateF64ToF32(floor($x));
}
+ return self::truncateF64ToF32(floor($x));
}
public static function f64Abs(float $x): float
@@ -336,18 +333,16 @@ final readonly class NumericOps
if (is_nan($x)) {
// Negate operator does not work for NaN in PHP.
return FloatOps::constructNan(FloatOps::getSignedness($x)->negated(), $x);
- } else {
- return -$x;
}
+ return -$x;
}
public static function f64PromoteF32(float $x): float
{
if (is_nan($x)) {
return NAN;
- } else {
- return $x;
}
+ return $x;
}
public static function f64ReinterpretI32(int $x): float
@@ -377,9 +372,8 @@ final readonly class NumericOps
}
if ($x < 0) {
return ceil($x);
- } else {
- return floor($x);
}
+ return floor($x);
}
public static function i32Add(int $x, int $y): int
@@ -398,7 +392,7 @@ final readonly class NumericOps
{
$x = self::convertS32ToU32($x);
$zeros = 0;
- for ($i = 31; 0 <= $i; $i--) {
+ for ($i = 31; $i >= 0; $i--) {
if (($x & (1 << $i)) === 0) {
$zeros++;
} else {
@@ -605,9 +599,8 @@ final readonly class NumericOps
$result = ($result >> 1) | 0x80000000;
}
return self::convertU32ToS32($result);
- } else {
- return $x >> $k;
}
+ return $x >> $k;
}
public static function i32ShrU(int $x, int $y): int
@@ -634,10 +627,10 @@ final readonly class NumericOps
if (is_infinite($x)) {
return TrapKind::IntegerOverflow;
}
- if ($x <= -2147483649.0 || 2147483648.0 <= $x) {
+ if ($x <= -2147483649.0 || $x >= 2147483648.0) {
return TrapKind::IntegerOverflow;
}
- return (int)round($x, mode: RoundingMode::TowardsZero);
+ return (int) round($x, mode: RoundingMode::TowardsZero);
}
public static function i32TruncF32U(float $x): int|TrapKind
@@ -648,10 +641,10 @@ final readonly class NumericOps
if (is_infinite($x)) {
return TrapKind::IntegerOverflow;
}
- if ($x <= -1.0 || 4294967296.0 <= $x) {
+ if ($x <= -1.0 || $x >= 4294967296.0) {
return TrapKind::IntegerOverflow;
}
- return self::convertU32ToS32((int)round($x, mode: RoundingMode::TowardsZero));
+ return self::convertU32ToS32((int) round($x, mode: RoundingMode::TowardsZero));
}
public static function i32TruncF64S(float $x): int|TrapKind
@@ -662,10 +655,10 @@ final readonly class NumericOps
if (is_infinite($x)) {
return TrapKind::IntegerOverflow;
}
- if ($x <= -2147483649.0 || 2147483648.0 <= $x) {
+ if ($x <= -2147483649.0 || $x >= 2147483648.0) {
return TrapKind::IntegerOverflow;
}
- return (int)round($x, mode: RoundingMode::TowardsZero);
+ return (int) round($x, mode: RoundingMode::TowardsZero);
}
public static function i32TruncF64U(float $x): int|TrapKind
@@ -676,10 +669,10 @@ final readonly class NumericOps
if (is_infinite($x)) {
return TrapKind::IntegerOverflow;
}
- if ($x <= -1.0 || 4294967296.0 <= $x) {
+ if ($x <= -1.0 || $x >= 4294967296.0) {
return TrapKind::IntegerOverflow;
}
- return self::convertU32ToS32((int)round($x, mode: RoundingMode::TowardsZero));
+ return self::convertU32ToS32((int) round($x, mode: RoundingMode::TowardsZero));
}
public static function i32TruncSatF32S(float $x): int
@@ -689,11 +682,10 @@ final readonly class NumericOps
}
if ($x < -2147483648.0) {
return -2147483648;
- } elseif (2147483647.0 < $x) {
+ } elseif ($x > 2147483647.0) {
return 2147483647;
- } else {
- return (int)round($x, mode: RoundingMode::TowardsZero);
}
+ return (int) round($x, mode: RoundingMode::TowardsZero);
}
public static function i32TruncSatF32U(float $x): int
@@ -703,11 +695,10 @@ final readonly class NumericOps
}
if ($x < 0.0) {
return 0;
- } elseif (4294967295.0 < $x) {
+ } elseif ($x > 4294967295.0) {
return -1;
- } else {
- return self::convertU32ToS32((int)round($x, mode: RoundingMode::TowardsZero));
}
+ return self::convertU32ToS32((int) round($x, mode: RoundingMode::TowardsZero));
}
public static function i32TruncSatF64S(float $x): int
@@ -717,11 +708,10 @@ final readonly class NumericOps
}
if ($x < -2147483648.0) {
return -2147483648;
- } elseif (2147483647.0 < $x) {
+ } elseif ($x > 2147483647.0) {
return 2147483647;
- } else {
- return (int)round($x, mode: RoundingMode::TowardsZero);
}
+ return (int) round($x, mode: RoundingMode::TowardsZero);
}
public static function i32TruncSatF64U(float $x): int
@@ -731,11 +721,10 @@ final readonly class NumericOps
}
if ($x < 0.0) {
return 0;
- } elseif (4294967295.0 < $x) {
+ } elseif ($x > 4294967295.0) {
return -1;
- } else {
- return self::convertU32ToS32((int)round($x, mode: RoundingMode::TowardsZero));
}
+ return self::convertU32ToS32((int) round($x, mode: RoundingMode::TowardsZero));
}
public static function i32WrapI64(int $x): int
@@ -752,7 +741,7 @@ final readonly class NumericOps
public static function i64Add(int $x, int $y): int
{
- return self::bigIntToPhpInt(bcadd((string)$x, (string)$y));
+ return self::bigIntToPhpInt(bcadd((string) $x, (string) $y));
}
public static function i64And(int $x, int $y): int
@@ -763,13 +752,12 @@ final readonly class NumericOps
public static function i64Clz(int $x): int
{
$zeros = 0;
- for ($i = 63; 0 <= $i; $i--) {
+ for ($i = 63; $i >= 0; $i--) {
if ($i === 63) {
if ($x < 0) {
break;
- } else {
- $zeros++;
}
+ $zeros++;
} else {
if (($x & (1 << $i)) === 0) {
$zeros++;
@@ -786,7 +774,7 @@ final readonly class NumericOps
$zeros = 0;
for ($i = 0; $i < 64; $i++) {
if ($i === 63) {
- if (0 <= $x) {
+ if ($x >= 0) {
$zeros++;
}
} else {
@@ -907,7 +895,7 @@ final readonly class NumericOps
public static function i64Mul(int $x, int $y): int
{
- return self::bigIntToPhpInt(bcmul((string)$x, (string)$y));
+ return self::bigIntToPhpInt(bcmul((string) $x, (string) $y));
}
public static function i64Ne(int $x, int $y): bool
@@ -962,7 +950,7 @@ final readonly class NumericOps
public static function i64RotL(int $x, int $y): int
{
$y = self::convertS64ToBigUInt($y);
- $k = (int)bcmod($y, '64');
+ $k = (int) bcmod($y, '64');
$left = $x << $k;
$right = $x;
for ($i = 0; $i < 64 - $k; $i++) {
@@ -974,7 +962,7 @@ final readonly class NumericOps
public static function i64RotR(int $x, int $y): int
{
$y = self::convertS64ToBigUInt($y);
- $k = (int)bcmod($y, '64');
+ $k = (int) bcmod($y, '64');
$left = $x;
for ($i = 0; $i < $k; $i++) {
$left = ($left >> 1) & 0x7FFFFFFFFFFFFFFF;
@@ -986,21 +974,21 @@ final readonly class NumericOps
public static function i64Shl(int $x, int $y): int
{
$y = self::convertS64ToBigUInt($y);
- $k = (int)bcmod($y, '64');
+ $k = (int) bcmod($y, '64');
return $x << $k;
}
public static function i64ShrS(int $x, int $y): int
{
$y = self::convertS64ToBigUInt($y);
- $k = (int)bcmod($y, '64');
+ $k = (int) bcmod($y, '64');
return $x >> $k;
}
public static function i64ShrU(int $x, int $y): int
{
$y = self::convertS64ToBigUInt($y);
- $k = (int)bcmod($y, '64');
+ $k = (int) bcmod($y, '64');
if ($k === 0) {
return $x;
}
@@ -1013,7 +1001,7 @@ final readonly class NumericOps
public static function i64Sub(int $x, int $y): int
{
- $result = self::bigIntToPhpInt(bcsub((string)$x, (string)$y));
+ $result = self::bigIntToPhpInt(bcsub((string) $x, (string) $y));
return $result;
}
@@ -1025,10 +1013,10 @@ final readonly class NumericOps
if (is_infinite($x)) {
return TrapKind::IntegerOverflow;
}
- if ($x < -9223372036854775808.0 || 9223372036854775808.0 <= $x) {
+ if ($x < -9223372036854775808.0 || $x >= 9223372036854775808.0) {
return TrapKind::IntegerOverflow;
}
- return (int)round($x, mode: RoundingMode::TowardsZero);
+ return (int) round($x, mode: RoundingMode::TowardsZero);
}
public static function i64TruncF32U(float $x): int|TrapKind
@@ -1039,7 +1027,7 @@ final readonly class NumericOps
if (is_infinite($x)) {
return TrapKind::IntegerOverflow;
}
- if ($x <= -1.0 || 18446744073709551616.0 <= $x) {
+ if ($x <= -1.0 || $x >= 18446744073709551616.0) {
return TrapKind::IntegerOverflow;
}
return self::bigIntToPhpInt(sprintf('%F', round($x, mode: RoundingMode::TowardsZero)));
@@ -1053,10 +1041,10 @@ final readonly class NumericOps
if (is_infinite($x)) {
return TrapKind::IntegerOverflow;
}
- if ($x < -9223372036854775808.0 || 9223372036854775808.0 <= $x) {
+ if ($x < -9223372036854775808.0 || $x >= 9223372036854775808.0) {
return TrapKind::IntegerOverflow;
}
- return (int)round($x, mode: RoundingMode::TowardsZero);
+ return (int) round($x, mode: RoundingMode::TowardsZero);
}
public static function i64TruncF64U(float $x): int|TrapKind
@@ -1067,7 +1055,7 @@ final readonly class NumericOps
if (is_infinite($x)) {
return TrapKind::IntegerOverflow;
}
- if ($x <= -1.0 || 18446744073709551616.0 <= $x) {
+ if ($x <= -1.0 || $x >= 18446744073709551616.0) {
return TrapKind::IntegerOverflow;
}
return self::bigIntToPhpInt(sprintf('%F', round($x, mode: RoundingMode::TowardsZero)));
@@ -1080,11 +1068,10 @@ final readonly class NumericOps
}
if ($x < -9223372036854775808.0) {
return PHP_INT_MIN;
- } elseif (9223372036854775808.0 <= $x) {
+ } elseif ($x >= 9223372036854775808.0) {
return PHP_INT_MAX;
- } else {
- return (int)round($x, mode: RoundingMode::TowardsZero);
}
+ return (int) round($x, mode: RoundingMode::TowardsZero);
}
public static function i64TruncSatF32U(float $x): int
@@ -1098,9 +1085,8 @@ final readonly class NumericOps
return self::bigIntToPhpInt('18446744073709551615');
} elseif (bccomp('18446744073709551615', sprintf('%.9F', $x)) < 0) {
return self::bigIntToPhpInt('18446744073709551615');
- } else {
- return self::bigIntToPhpInt(sprintf('%F', round($x, mode: RoundingMode::TowardsZero)));
}
+ return self::bigIntToPhpInt(sprintf('%F', round($x, mode: RoundingMode::TowardsZero)));
}
public static function i64TruncSatF64S(float $x): int
@@ -1110,11 +1096,10 @@ final readonly class NumericOps
}
if ($x < -9223372036854775808.0) {
return PHP_INT_MIN;
- } elseif (9223372036854775808.0 <= $x) {
+ } elseif ($x >= 9223372036854775808.0) {
return PHP_INT_MAX;
- } else {
- return (int)round($x, mode: RoundingMode::TowardsZero);
}
+ return (int) round($x, mode: RoundingMode::TowardsZero);
}
public static function i64TruncSatF64U(float $x): int
@@ -1128,9 +1113,8 @@ final readonly class NumericOps
return self::bigIntToPhpInt('18446744073709551615');
} elseif (bccomp('18446744073709551615', sprintf('%.9F', $x)) < 0) {
return self::bigIntToPhpInt('18446744073709551615');
- } else {
- return self::bigIntToPhpInt(sprintf('%F', round($x, mode: RoundingMode::TowardsZero)));
}
+ return self::bigIntToPhpInt(sprintf('%F', round($x, mode: RoundingMode::TowardsZero)));
}
public static function i64Xor(int $x, int $y): int
@@ -1143,25 +1127,22 @@ final readonly class NumericOps
return BinaryConversion::deserializeF32(BinaryConversion::serializeF32($x));
}
-
public static function convertS32ToU32(int $x): int
{
- assert(-0x80000000 <= $x && $x <= 0x7FFFFFFF);
+ assert($x >= -0x80000000 && $x <= 0x7FFFFFFF);
if ($x < 0) {
return $x + 0x100000000;
- } else {
- return $x;
}
+ return $x;
}
public static function convertU32ToS32(int $x): int
{
- assert(0x00000000 <= $x && $x <= 0xFFFFFFFF);
+ assert($x >= 0x00000000 && $x <= 0xFFFFFFFF);
if (($x & 0x80000000) !== 0) {
return $x - 0x100000000;
- } else {
- return $x;
}
+ return $x;
}
/**
@@ -1170,10 +1151,9 @@ final readonly class NumericOps
public static function convertS64ToBigUInt(int $x): string
{
if ($x < 0) {
- return bcadd((string)$x, '18446744073709551616');
- } else {
- return (string)$x;
+ return bcadd((string) $x, '18446744073709551616');
}
+ return (string) $x;
}
public static function bigIntToPhpInt(string $s): int
@@ -1190,6 +1170,6 @@ final readonly class NumericOps
$result = bcsub($result, bcpow('2', '64'));
}
}
- return (int)$result;
+ return (int) $result;
}
}
diff --git a/src/WebAssembly/Execution/Runtime.php b/src/WebAssembly/Execution/Runtime.php
index a120d7d..dea0cda 100644
--- a/src/WebAssembly/Execution/Runtime.php
+++ b/src/WebAssembly/Execution/Runtime.php
@@ -188,7 +188,7 @@ final class Runtime implements ExporterInterface
try {
$export = $this->getExport($name);
if ($export === null) {
- throw new TrapException("invoke($name) not found", trapKind: TrapKind::UninitializedElement);
+ throw new TrapException("invoke({$name}) not found", trapKind: TrapKind::UninitializedElement);
}
assert($export instanceof ExternVals\Func);
$funcAddr = $export->addr;
@@ -198,9 +198,9 @@ final class Runtime implements ExporterInterface
$paramTypes = $funcInst->type->params;
$resultTypes = $funcInst->type->results;
if (count($paramTypes) !== count($vals)) {
- throw new RuntimeException("invoke($name) invalid function arity: expected " . count($paramTypes) . ", got " . count($vals));
+ throw new RuntimeException("invoke({$name}) invalid function arity: expected " . count($paramTypes) . ', got ' . count($vals));
}
- $f = new Frame(0, [], new ModuleInst([], [], [], [], [], [], [], []), "export: $name");
+ $f = new Frame(0, [], new ModuleInst([], [], [], [], [], [], [], []), "export: {$name}");
$this->stack->pushFrame($f);
foreach ($vals as $val) {
$this->stack->pushValue($val);
@@ -229,7 +229,7 @@ final class Runtime implements ExporterInterface
} elseif ($fn instanceof FuncInsts\Host) {
$this->doInvokeHostFunc($fn);
} else {
- throw new RuntimeException("doInvokeFunc: unreachable");
+ throw new RuntimeException('doInvokeFunc: unreachable');
}
}
@@ -248,7 +248,7 @@ final class Runtime implements ExporterInterface
array_map(fn ($local) => self::defaultValueFromValType($local->type), $ts),
),
$fn->module,
- "wasm: $funcAddr",
+ "wasm: {$funcAddr}",
);
$this->activateFrame($f);
$l = new Label($m);
@@ -265,7 +265,7 @@ final class Runtime implements ExporterInterface
{
$vals = $this->stack->popNValues($arity);
$this->stack->popEntriesToCurrentFrame();
- for ($i = $arity - 1; 0 <= $i; $i--) {
+ for ($i = $arity - 1; $i >= 0; $i--) {
$this->stack->pushValue($vals[$i]);
}
}
@@ -283,7 +283,7 @@ final class Runtime implements ExporterInterface
$vals = $this->stack->popNValues($arity);
$this->stack->popValuesToLabel();
}
- for ($i = count($vals) - 1; 0 <= $i; $i--) {
+ for ($i = count($vals) - 1; $i >= 0; $i--) {
$this->stack->pushValue($vals[$i]);
}
}
@@ -301,7 +301,7 @@ final class Runtime implements ExporterInterface
assert($m === 0);
return;
}
- if (!is_array($results)) {
+ if (! is_array($results)) {
$results = [$results];
}
assert($m === count($results));
@@ -564,7 +564,7 @@ final class Runtime implements ExporterInterface
Instrs\Control\Nop::class => $this->execInstrControlNop($instr),
Instrs\Control\Return_::class => $this->execInstrControlReturn_($instr),
Instrs\Control\Unreachable::class => $this->execInstrControlUnreachable($instr),
- default => throw new RuntimeException("invalid instruction"),
+ default => throw new RuntimeException('invalid instruction'),
};
}
@@ -964,7 +964,7 @@ final class Runtime implements ExporterInterface
$y = $this->stack->popInt();
$x = $this->stack->popInt();
$result = NumericOps::i32DivS($x, $y);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -975,7 +975,7 @@ final class Runtime implements ExporterInterface
$y = $this->stack->popInt();
$x = $this->stack->popInt();
$result = NumericOps::i32DivU($x, $y);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1106,7 +1106,7 @@ final class Runtime implements ExporterInterface
$y = $this->stack->popInt();
$x = $this->stack->popInt();
$result = NumericOps::i32RemS($x, $y);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1117,7 +1117,7 @@ final class Runtime implements ExporterInterface
$y = $this->stack->popInt();
$x = $this->stack->popInt();
$result = NumericOps::i32RemU($x, $y);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1169,7 +1169,7 @@ final class Runtime implements ExporterInterface
{
$x = $this->stack->popFloat();
$result = NumericOps::i32TruncF32S($x);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1179,7 +1179,7 @@ final class Runtime implements ExporterInterface
{
$x = $this->stack->popFloat();
$result = NumericOps::i32TruncF32U($x);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1189,7 +1189,7 @@ final class Runtime implements ExporterInterface
{
$x = $this->stack->popFloat();
$result = NumericOps::i32TruncF64S($x);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1199,7 +1199,7 @@ final class Runtime implements ExporterInterface
{
$x = $this->stack->popFloat();
$result = NumericOps::i32TruncF64U($x);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1278,7 +1278,7 @@ final class Runtime implements ExporterInterface
$y = $this->stack->popInt();
$x = $this->stack->popInt();
$result = NumericOps::i64DivS($x, $y);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1289,7 +1289,7 @@ final class Runtime implements ExporterInterface
$y = $this->stack->popInt();
$x = $this->stack->popInt();
$result = NumericOps::i64DivU($x, $y);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1438,7 +1438,7 @@ final class Runtime implements ExporterInterface
$y = $this->stack->popInt();
$x = $this->stack->popInt();
$result = NumericOps::i64RemS($x, $y);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1449,7 +1449,7 @@ final class Runtime implements ExporterInterface
$y = $this->stack->popInt();
$x = $this->stack->popInt();
$result = NumericOps::i64RemU($x, $y);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1501,7 +1501,7 @@ final class Runtime implements ExporterInterface
{
$x = $this->stack->popFloat();
$result = NumericOps::i64TruncF32S($x);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1511,7 +1511,7 @@ final class Runtime implements ExporterInterface
{
$x = $this->stack->popFloat();
$result = NumericOps::i64TruncF32U($x);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1521,7 +1521,7 @@ final class Runtime implements ExporterInterface
{
$x = $this->stack->popFloat();
$result = NumericOps::i64TruncF64S($x);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1531,7 +1531,7 @@ final class Runtime implements ExporterInterface
{
$x = $this->stack->popFloat();
$result = NumericOps::i64TruncF64U($x);
- if (!is_int($result)) {
+ if (! is_int($result)) {
throw new TrapException($instr::opName() . ': invalid operation', trapKind: $result);
}
$this->stack->pushValue($result);
@@ -1631,7 +1631,7 @@ final class Runtime implements ExporterInterface
$f = $this->stack->currentFrame();
$val = $f->locals[$x] ?? null;
if ($val === null) {
- throw new RuntimeException("local.get: local $x not found in [$f->debugName]");
+ throw new RuntimeException("local.get: local {$x} not found in [{$f->debugName}]");
}
$this->stack->pushValue($val);
}
@@ -1678,7 +1678,7 @@ final class Runtime implements ExporterInterface
$s = NumericOps::convertS32ToU32($this->stack->popInt());
$d = NumericOps::convertS32ToU32($this->stack->popInt());
if (count($tabX->elem) < $d + $n || count($tabY->elem) < $s + $n) {
- throw new TrapException("table.copy: out of bounds", trapKind: TrapKind::OutOfBoundsTableAccess);
+ throw new TrapException('table.copy: out of bounds', trapKind: TrapKind::OutOfBoundsTableAccess);
}
if ($n === 0 || ($x === $y && $d === $s)) {
return;
@@ -1701,7 +1701,7 @@ final class Runtime implements ExporterInterface
$val = $this->stack->popRef();
$i = NumericOps::convertS32ToU32($this->stack->popInt());
if (count($tab->elem) < $i + $n) {
- throw new TrapException("table.fill: out of bounds", trapKind: TrapKind::OutOfBoundsTableAccess);
+ throw new TrapException('table.fill: out of bounds', trapKind: TrapKind::OutOfBoundsTableAccess);
}
for ($k = 0; $k < $n; $k++) {
// @phpstan-ignore-next-line
@@ -1717,7 +1717,7 @@ final class Runtime implements ExporterInterface
$tab = $this->store->tables[$a];
$i = NumericOps::convertS32ToU32($this->stack->popInt());
if (count($tab->elem) <= $i) {
- throw new TrapException("table.get: out of bounds", trapKind: TrapKind::OutOfBoundsTableAccess);
+ throw new TrapException('table.get: out of bounds', trapKind: TrapKind::OutOfBoundsTableAccess);
}
$val = $tab->elem[$i];
$this->stack->pushValue($val);
@@ -1741,7 +1741,7 @@ final class Runtime implements ExporterInterface
$limits = $tab->type->limits;
$limits_ = new Limits($len, $limits->max);
- if (!$limits_->isValid()) {
+ if (! $limits_->isValid()) {
$this->stack->pushValue(-1);
return;
}
@@ -1767,10 +1767,10 @@ final class Runtime implements ExporterInterface
$s = NumericOps::convertS32ToU32($this->stack->popInt());
$d = NumericOps::convertS32ToU32($this->stack->popInt());
if (count($elem->elem) < $s + $n) {
- throw new TrapException("table.init: out of bounds", trapKind: TrapKind::OutOfBoundsTableAccess);
+ throw new TrapException('table.init: out of bounds', trapKind: TrapKind::OutOfBoundsTableAccess);
}
if (count($tab->elem) < $d + $n) {
- throw new TrapException("table.init: out of bounds", trapKind: TrapKind::OutOfBoundsTableAccess);
+ throw new TrapException('table.init: out of bounds', trapKind: TrapKind::OutOfBoundsTableAccess);
}
for ($i = 0; $i < $n; $i++) {
// @phpstan-ignore-next-line
@@ -1787,7 +1787,7 @@ final class Runtime implements ExporterInterface
$val = $this->stack->popRef();
$i = NumericOps::convertS32ToU32($this->stack->popInt());
if (count($tab->elem) <= $i) {
- throw new TrapException("table.set: out of bounds", trapKind: TrapKind::OutOfBoundsTableAccess);
+ throw new TrapException('table.set: out of bounds', trapKind: TrapKind::OutOfBoundsTableAccess);
}
// @phpstan-ignore-next-line
$tab->elem[$i] = $val;
@@ -1827,8 +1827,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
$ea = $i + $offset;
$ok = $mem->storeF32($ea, $c);
- if (!$ok) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ if (! $ok) {
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
}
@@ -1847,8 +1847,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
$ea = $i + $offset;
$ok = $mem->storeF64($ea, $c);
- if (!$ok) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ if (! $ok) {
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
}
@@ -1862,7 +1862,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI32_s32($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -1877,7 +1877,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI32_s16($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -1892,7 +1892,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI32_u16($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -1907,7 +1907,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI32_s8($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -1922,7 +1922,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI32_u8($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -1937,8 +1937,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
$ea = $i + $offset;
$ok = $mem->storeI32_s32($ea, $c);
- if (!$ok) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ if (! $ok) {
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
}
@@ -1952,8 +1952,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
$ea = $i + $offset;
$ok = $mem->storeI32_s16($ea, $c);
- if (!$ok) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ if (! $ok) {
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
}
@@ -1967,8 +1967,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
$ea = $i + $offset;
$ok = $mem->storeI32_s8($ea, $c);
- if (!$ok) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ if (! $ok) {
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
}
@@ -1982,7 +1982,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI64_s64($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -1997,7 +1997,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI64_s16($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -2012,7 +2012,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI64_u16($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -2027,7 +2027,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI64_s32($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -2042,7 +2042,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI64_u32($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -2057,7 +2057,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI64_s8($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -2072,7 +2072,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadI64_u8($ea);
if ($c === null) {
- throw new TrapException($instr::opName() . ": out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException($instr::opName() . ': out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -2087,8 +2087,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
$ea = $i + $offset;
$ok = $mem->storeI64_s64($ea, $c);
- if (!$ok) {
- throw new TrapException($instr::opName() . ": out of bounds: $ea >= " . $mem->size(), trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ if (! $ok) {
+ throw new TrapException($instr::opName() . ": out of bounds: {$ea} >= " . $mem->size(), trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
}
@@ -2102,8 +2102,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
$ea = $i + $offset;
$ok = $mem->storeI64_s16($ea, $c);
- if (!$ok) {
- throw new TrapException($instr::opName() . ": out of bounds: $ea >= " . $mem->size(), trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ if (! $ok) {
+ throw new TrapException($instr::opName() . ": out of bounds: {$ea} >= " . $mem->size(), trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
}
@@ -2117,8 +2117,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
$ea = $i + $offset;
$ok = $mem->storeI64_s32($ea, $c);
- if (!$ok) {
- throw new TrapException($instr::opName() . ": out of bounds: $ea >= " . $mem->size(), trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ if (! $ok) {
+ throw new TrapException($instr::opName() . ": out of bounds: {$ea} >= " . $mem->size(), trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
}
@@ -2132,8 +2132,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
$ea = $i + $offset;
$ok = $mem->storeI64_s8($ea, $c);
- if (!$ok) {
- throw new TrapException($instr::opName() . ": out of bounds: $ea >= " . $mem->size(), trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ if (! $ok) {
+ throw new TrapException($instr::opName() . ": out of bounds: {$ea} >= " . $mem->size(), trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
}
@@ -2146,7 +2146,7 @@ final class Runtime implements ExporterInterface
$s = NumericOps::convertS32ToU32($this->stack->popInt());
$d = NumericOps::convertS32ToU32($this->stack->popInt());
if ($mem->size() < $s + $n || $mem->size() < $d + $n) {
- throw new TrapException("memory.copy: out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException('memory.copy: out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$mem->memcpy($d, $s, $n);
}
@@ -2160,7 +2160,7 @@ final class Runtime implements ExporterInterface
$val = $this->stack->popInt();
$d = NumericOps::convertS32ToU32($this->stack->popInt());
if ($mem->size() < $d + $n) {
- throw new TrapException("memory.fill: out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException('memory.fill: out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$mem->memset($d, $val, $n);
}
@@ -2187,10 +2187,10 @@ final class Runtime implements ExporterInterface
$s = NumericOps::convertS32ToU32($this->stack->popInt());
$d = NumericOps::convertS32ToU32($this->stack->popInt());
if (count($data->data) < $s + $n) {
- throw new TrapException("memory.init: out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException('memory.init: out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
if ($mem->size() < $d + $n) {
- throw new TrapException("memory.init: out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException('memory.init: out of bounds', trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$mem->copyData($data->data, $s, $d, $n);
}
@@ -2240,9 +2240,8 @@ final class Runtime implements ExporterInterface
$c = $this->stack->popInt();
if ($c !== 0) {
return $l;
- } else {
- return null;
}
+ return null;
}
private function execInstrControlBrTable(Instrs\Control\BrTable $instr): int
@@ -2252,9 +2251,8 @@ final class Runtime implements ExporterInterface
$i = NumericOps::convertS32ToU32($this->stack->popInt());
if ($i < count($ls)) {
return $ls[$i];
- } else {
- return $ln;
}
+ return $ln;
}
private function execInstrControlCall(Instrs\Control\Call $instr): void
@@ -2275,19 +2273,19 @@ final class Runtime implements ExporterInterface
$ftExpect = $f->module->types[$y];
$i = NumericOps::convertS32ToU32($this->stack->popInt());
if (count($tab->elem) <= $i) {
- throw new TrapException("call_indirect: out of bounds", trapKind: TrapKind::UndefinedElement);
+ throw new TrapException('call_indirect: out of bounds', trapKind: TrapKind::UndefinedElement);
}
$r = $tab->elem[$i];
if ($r instanceof Refs\RefNull) {
- throw new TrapException("call_indirect: ref.null", trapKind: TrapKind::UninitializedElement);
+ throw new TrapException('call_indirect: ref.null', trapKind: TrapKind::UninitializedElement);
}
assert($r instanceof Refs\RefFunc);
$a = $r->addr;
$fn = $this->store->funcs[$a];
assert($fn instanceof FuncInsts\Wasm || $fn instanceof FuncInsts\Host);
$ftActual = $fn->type;
- if (!$ftExpect->equals($ftActual)) {
- throw new TrapException("call_indirect: type mismatch", trapKind: TrapKind::IndirectCallTypeMismatch);
+ if (! $ftExpect->equals($ftActual)) {
+ throw new TrapException('call_indirect: type mismatch', trapKind: TrapKind::IndirectCallTypeMismatch);
}
$this->doInvokeFunc($a);
}
@@ -2310,9 +2308,8 @@ final class Runtime implements ExporterInterface
$c = $this->stack->popInt();
if ($c !== 0) {
return $this->execInstr(Instr::Block($blockType, $instrs1));
- } else {
- return $this->execInstr(Instr::Block($blockType, $instrs2));
}
+ return $this->execInstr(Instr::Block($blockType, $instrs2));
}
private function execInstrControlLoop(Instrs\Control\Loop $instr): ?int
@@ -2333,10 +2330,9 @@ final class Runtime implements ExporterInterface
} elseif ($result === 0) {
$this->deactivateLabel($m);
continue;
- } else {
- $this->deactivateLabel(null);
- return $result - 1;
}
+ $this->deactivateLabel(null);
+ return $result - 1;
}
}
@@ -2352,7 +2348,7 @@ final class Runtime implements ExporterInterface
private function execInstrControlUnreachable(Instrs\Control\Unreachable $instr): void
{
- throw new TrapException("unreachable", trapKind: TrapKind::Unreachable);
+ throw new TrapException('unreachable', trapKind: TrapKind::Unreachable);
}
private function doLoadF32(int $offset, string $instrOpName): void
@@ -2364,7 +2360,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadF32($ea);
if ($c === null) {
- throw new TrapException("$instrOpName: out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException("{$instrOpName}: out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -2378,7 +2374,7 @@ final class Runtime implements ExporterInterface
$ea = $i + $offset;
$c = $mem->loadF64($ea);
if ($c === null) {
- throw new TrapException("$instrOpName: out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
+ throw new TrapException("{$instrOpName}: out of bounds", trapKind: TrapKind::OutOfBoundsMemoryAccess);
}
$this->stack->pushValue($c);
}
@@ -2391,7 +2387,7 @@ final class Runtime implements ExporterInterface
ValType::F32 => 0.0,
ValType::F64 => 0.0,
ValType::FuncRef, ValType::ExternRef => Ref::RefNull($type),
- default => throw new RuntimeException("unreachable"),
+ default => throw new RuntimeException('unreachable'),
};
}
@@ -2405,8 +2401,7 @@ final class Runtime implements ExporterInterface
[],
$t === null ? [] : [$t],
);
- } else {
- throw new RuntimeException("expand(): invalid blocktype");
}
+ throw new RuntimeException('expand(): invalid blocktype');
}
}
diff --git a/src/WebAssembly/Execution/Stack.php b/src/WebAssembly/Execution/Stack.php
index befa3dc..87113a1 100644
--- a/src/WebAssembly/Execution/Stack.php
+++ b/src/WebAssembly/Execution/Stack.php
@@ -9,7 +9,6 @@ use function assert;
use function count;
use function is_float;
use function is_int;
-use function is_null;
final class Stack
{
@@ -51,7 +50,7 @@ final class Stack
public function pushBool(bool $value): void
{
- $this->pushValue((int)$value);
+ $this->pushValue((int) $value);
}
/**
@@ -117,7 +116,7 @@ final class Stack
public function popInt(): int
{
$v = $this->popValue();
- assert(is_int($v), "Expected an int on top of the stack, but got " . self::getValueTypeName($v));
+ assert(is_int($v), 'Expected an int on top of the stack, but got ' . self::getValueTypeName($v));
return $v;
}
@@ -127,14 +126,14 @@ final class Stack
public function popFloat(): float
{
$v = $this->popValue();
- assert(is_float($v), "Expected a float on top of the stack, but got " . self::getValueTypeName($v));
+ assert(is_float($v), 'Expected a float on top of the stack, but got ' . self::getValueTypeName($v));
return $v;
}
public function popRef(): Ref
{
$v = $this->popValue();
- assert($v instanceof Ref, "Expected a Ref on top of the stack, but got " . self::getValueTypeName($v));
+ assert($v instanceof Ref, 'Expected a Ref on top of the stack, but got ' . self::getValueTypeName($v));
return $v;
}
@@ -144,21 +143,20 @@ final class Stack
public function popValuesToLabel(): array
{
$results = [];
- while (!$this->isEmpty()) {
+ while (! $this->isEmpty()) {
$top = $this->pop();
if ($top instanceof Label) {
break;
- } else {
- assert(is_int($top) || is_float($top) || $top instanceof Ref);
- $results[] = $top;
}
+ assert(is_int($top) || is_float($top) || $top instanceof Ref);
+ $results[] = $top;
}
return $results;
}
public function popEntriesToCurrentFrame(): void
{
- while (!$this->isEmpty() && !$this->top() instanceof Frame) {
+ while (! $this->isEmpty() && ! $this->top() instanceof Frame) {
$this->pop();
}
$this->popFrame();
@@ -204,7 +202,7 @@ final class Stack
private static function getValueTypeName(int|float|Ref|Frame|Label|null $value): string
{
return match (true) {
- is_null($value) => 'null',
+ $value === null => 'null',
is_int($value) => 'int',
is_float($value) => 'float',
$value instanceof Ref => 'Ref',
diff --git a/src/WebAssembly/Execution/Store.php b/src/WebAssembly/Execution/Store.php
index 18f8626..b9d1b1a 100644
--- a/src/WebAssembly/Execution/Store.php
+++ b/src/WebAssembly/Execution/Store.php
@@ -68,7 +68,7 @@ final class Store
$this->globals[] = $extern->global;
return ExternVal::Global_(count($this->globals) - 1);
default:
- throw new RuntimeException("unreachable");
+ throw new RuntimeException('unreachable');
}
}
}
diff --git a/src/WebAssembly/Execution/TrapException.php b/src/WebAssembly/Execution/TrapException.php
index 449f9ca..3644d33 100644
--- a/src/WebAssembly/Execution/TrapException.php
+++ b/src/WebAssembly/Execution/TrapException.php
@@ -12,7 +12,7 @@ class TrapException extends RuntimeException
private readonly TrapKind $trapKind;
public function __construct(
- string $message = "",
+ string $message = '',
int $code = 0,
?Throwable $previous = null,
TrapKind $trapKind = TrapKind::Unknown,
diff --git a/src/WebAssembly/Structure/Instructions/Instr.php b/src/WebAssembly/Structure/Instructions/Instr.php
index 5f9cf29..3e53f2d 100644
--- a/src/WebAssembly/Structure/Instructions/Instr.php
+++ b/src/WebAssembly/Structure/Instructions/Instr.php
@@ -21,14 +21,17 @@ abstract readonly class Instr
{
return new Numeric\F32Abs();
}
+
final public static function F32Add(): Numeric\F32Add
{
return new Numeric\F32Add();
}
+
final public static function F32Ceil(): Numeric\F32Ceil
{
return new Numeric\F32Ceil();
}
+
/**
* @param F32 $value
*/
@@ -36,114 +39,142 @@ abstract readonly class Instr
{
return new Numeric\F32Const($value);
}
+
final public static function F32ConvertI32S(): Numeric\F32ConvertI32S
{
return new Numeric\F32ConvertI32S();
}
+
final public static function F32ConvertI32U(): Numeric\F32ConvertI32U
{
return new Numeric\F32ConvertI32U();
}
+
final public static function F32ConvertI64S(): Numeric\F32ConvertI64S
{
return new Numeric\F32ConvertI64S();
}
+
final public static function F32ConvertI64U(): Numeric\F32ConvertI64U
{
return new Numeric\F32ConvertI64U();
}
+
final public static function F32CopySign(): Numeric\F32CopySign
{
return new Numeric\F32CopySign();
}
+
final public static function F32DemoteF64(): Numeric\F32DemoteF64
{
return new Numeric\F32DemoteF64();
}
+
final public static function F32Div(): Numeric\F32Div
{
return new Numeric\F32Div();
}
+
final public static function F32Eq(): Numeric\F32Eq
{
return new Numeric\F32Eq();
}
+
final public static function F32Floor(): Numeric\F32Floor
{
return new Numeric\F32Floor();
}
+
final public static function F32Ge(): Numeric\F32Ge
{
return new Numeric\F32Ge();
}
+
final public static function F32Gt(): Numeric\F32Gt
{
return new Numeric\F32Gt();
}
+
final public static function F32Le(): Numeric\F32Le
{
return new Numeric\F32Le();
}
+
final public static function F32Lt(): Numeric\F32Lt
{
return new Numeric\F32Lt();
}
+
final public static function F32Max(): Numeric\F32Max
{
return new Numeric\F32Max();
}
+
final public static function F32Min(): Numeric\F32Min
{
return new Numeric\F32Min();
}
+
final public static function F32Mul(): Numeric\F32Mul
{
return new Numeric\F32Mul();
}
+
final public static function F32Ne(): Numeric\F32Ne
{
return new Numeric\F32Ne();
}
+
final public static function F32Nearest(): Numeric\F32Nearest
{
return new Numeric\F32Nearest();
}
+
final public static function F32Neg(): Numeric\F32Neg
{
return new Numeric\F32Neg();
}
+
final public static function F32ReinterpretI32(): Numeric\F32ReinterpretI32
{
return new Numeric\F32ReinterpretI32();
}
+
final public static function F32ReinterpretI64(): Numeric\F32ReinterpretI64
{
return new Numeric\F32ReinterpretI64();
}
+
final public static function F32Sqrt(): Numeric\F32Sqrt
{
return new Numeric\F32Sqrt();
}
+
final public static function F32Sub(): Numeric\F32Sub
{
return new Numeric\F32Sub();
}
+
final public static function F32Trunc(): Numeric\F32Trunc
{
return new Numeric\F32Trunc();
}
+
final public static function F64Abs(): Numeric\F64Abs
{
return new Numeric\F64Abs();
}
+
final public static function F64Add(): Numeric\F64Add
{
return new Numeric\F64Add();
}
+
final public static function F64Ceil(): Numeric\F64Ceil
{
return new Numeric\F64Ceil();
}
+
/**
* @param F64 $value
*/
@@ -151,114 +182,142 @@ abstract readonly class Instr
{
return new Numeric\F64Const($value);
}
+
final public static function F64ConvertI32S(): Numeric\F64ConvertI32S
{
return new Numeric\F64ConvertI32S();
}
+
final public static function F64ConvertI32U(): Numeric\F64ConvertI32U
{
return new Numeric\F64ConvertI32U();
}
+
final public static function F64ConvertI64S(): Numeric\F64ConvertI64S
{
return new Numeric\F64ConvertI64S();
}
+
final public static function F64ConvertI64U(): Numeric\F64ConvertI64U
{
return new Numeric\F64ConvertI64U();
}
+
final public static function F64CopySign(): Numeric\F64CopySign
{
return new Numeric\F64CopySign();
}
+
final public static function F64Div(): Numeric\F64Div
{
return new Numeric\F64Div();
}
+
final public static function F64Eq(): Numeric\F64Eq
{
return new Numeric\F64Eq();
}
+
final public static function F64Floor(): Numeric\F64Floor
{
return new Numeric\F64Floor();
}
+
final public static function F64Ge(): Numeric\F64Ge
{
return new Numeric\F64Ge();
}
+
final public static function F64Gt(): Numeric\F64Gt
{
return new Numeric\F64Gt();
}
+
final public static function F64Le(): Numeric\F64Le
{
return new Numeric\F64Le();
}
+
final public static function F64Lt(): Numeric\F64Lt
{
return new Numeric\F64Lt();
}
+
final public static function F64Max(): Numeric\F64Max
{
return new Numeric\F64Max();
}
+
final public static function F64Min(): Numeric\F64Min
{
return new Numeric\F64Min();
}
+
final public static function F64Mul(): Numeric\F64Mul
{
return new Numeric\F64Mul();
}
+
final public static function F64Ne(): Numeric\F64Ne
{
return new Numeric\F64Ne();
}
+
final public static function F64Nearest(): Numeric\F64Nearest
{
return new Numeric\F64Nearest();
}
+
final public static function F64Neg(): Numeric\F64Neg
{
return new Numeric\F64Neg();
}
+
final public static function F64PromoteF32(): Numeric\F64PromoteF32
{
return new Numeric\F64PromoteF32();
}
+
final public static function F64ReinterpretI32(): Numeric\F64ReinterpretI32
{
return new Numeric\F64ReinterpretI32();
}
+
final public static function F64ReinterpretI64(): Numeric\F64ReinterpretI64
{
return new Numeric\F64ReinterpretI64();
}
+
final public static function F64Sqrt(): Numeric\F64Sqrt
{
return new Numeric\F64Sqrt();
}
+
final public static function F64Sub(): Numeric\F64Sub
{
return new Numeric\F64Sub();
}
+
final public static function F64Trunc(): Numeric\F64Trunc
{
return new Numeric\F64Trunc();
}
+
final public static function I32Add(): Numeric\I32Add
{
return new Numeric\I32Add();
}
+
final public static function I32And(): Numeric\I32And
{
return new Numeric\I32And();
}
+
final public static function I32Clz(): Numeric\I32Clz
{
return new Numeric\I32Clz();
}
+
/**
* @param S64 $value
*/
@@ -266,174 +325,217 @@ abstract readonly class Instr
{
return new Numeric\I32Const($value);
}
+
final public static function I32Ctz(): Numeric\I32Ctz
{
return new Numeric\I32Ctz();
}
+
final public static function I32DivS(): Numeric\I32DivS
{
return new Numeric\I32DivS();
}
+
final public static function I32DivU(): Numeric\I32DivU
{
return new Numeric\I32DivU();
}
+
final public static function I32Eq(): Numeric\I32Eq
{
return new Numeric\I32Eq();
}
+
final public static function I32Eqz(): Numeric\I32Eqz
{
return new Numeric\I32Eqz();
}
+
final public static function I32Extend16S(): Numeric\I32Extend16S
{
return new Numeric\I32Extend16S();
}
+
final public static function I32Extend8S(): Numeric\I32Extend8S
{
return new Numeric\I32Extend8S();
}
+
final public static function I32GeS(): Numeric\I32GeS
{
return new Numeric\I32GeS();
}
+
final public static function I32GeU(): Numeric\I32GeU
{
return new Numeric\I32GeU();
}
+
final public static function I32GtS(): Numeric\I32GtS
{
return new Numeric\I32GtS();
}
+
final public static function I32GtU(): Numeric\I32GtU
{
return new Numeric\I32GtU();
}
+
final public static function I32LeS(): Numeric\I32LeS
{
return new Numeric\I32LeS();
}
+
final public static function I32LeU(): Numeric\I32LeU
{
return new Numeric\I32LeU();
}
+
final public static function I32LtS(): Numeric\I32LtS
{
return new Numeric\I32LtS();
}
+
final public static function I32LtU(): Numeric\I32LtU
{
return new Numeric\I32LtU();
}
+
final public static function I32Mul(): Numeric\I32Mul
{
return new Numeric\I32Mul();
}
+
final public static function I32Ne(): Numeric\I32Ne
{
return new Numeric\I32Ne();
}
+
final public static function I32Or(): Numeric\I32Or
{
return new Numeric\I32Or();
}
+
final public static function I32Popcnt(): Numeric\I32Popcnt
{
return new Numeric\I32Popcnt();
}
+
final public static function I32ReinterpretF32(): Numeric\I32ReinterpretF32
{
return new Numeric\I32ReinterpretF32();
}
+
final public static function I32ReinterpretF64(): Numeric\I32ReinterpretF64
{
return new Numeric\I32ReinterpretF64();
}
+
final public static function I32RemS(): Numeric\I32RemS
{
return new Numeric\I32RemS();
}
+
final public static function I32RemU(): Numeric\I32RemU
{
return new Numeric\I32RemU();
}
+
final public static function I32RotL(): Numeric\I32RotL
{
return new Numeric\I32RotL();
}
+
final public static function I32RotR(): Numeric\I32RotR
{
return new Numeric\I32RotR();
}
+
final public static function I32Shl(): Numeric\I32Shl
{
return new Numeric\I32Shl();
}
+
final public static function I32ShrS(): Numeric\I32ShrS
{
return new Numeric\I32ShrS();
}
+
final public static function I32ShrU(): Numeric\I32ShrU
{
return new Numeric\I32ShrU();
}
+
final public static function I32Sub(): Numeric\I32Sub
{
return new Numeric\I32Sub();
}
+
final public static function I32TruncF32S(): Numeric\I32TruncF32S
{
return new Numeric\I32TruncF32S();
}
+
final public static function I32TruncF32U(): Numeric\I32TruncF32U
{
return new Numeric\I32TruncF32U();
}
+
final public static function I32TruncF64S(): Numeric\I32TruncF64S
{
return new Numeric\I32TruncF64S();
}
+
final public static function I32TruncF64U(): Numeric\I32TruncF64U
{
return new Numeric\I32TruncF64U();
}
+
final public static function I32TruncSatF32S(): Numeric\I32TruncSatF32S
{
return new Numeric\I32TruncSatF32S();
}
+
final public static function I32TruncSatF32U(): Numeric\I32TruncSatF32U
{
return new Numeric\I32TruncSatF32U();
}
+
final public static function I32TruncSatF64S(): Numeric\I32TruncSatF64S
{
return new Numeric\I32TruncSatF64S();
}
+
final public static function I32TruncSatF64U(): Numeric\I32TruncSatF64U
{
return new Numeric\I32TruncSatF64U();
}
+
final public static function I32WrapI64(): Numeric\I32WrapI64
{
return new Numeric\I32WrapI64();
}
+
final public static function I32Xor(): Numeric\I32Xor
{
return new Numeric\I32Xor();
}
+
final public static function I64Add(): Numeric\I64Add
{
return new Numeric\I64Add();
}
+
final public static function I64And(): Numeric\I64And
{
return new Numeric\I64And();
}
+
final public static function I64Clz(): Numeric\I64Clz
{
return new Numeric\I64Clz();
}
+
/**
* @param S64 $value
*/
@@ -441,166 +543,207 @@ abstract readonly class Instr
{
return new Numeric\I64Const($value);
}
+
final public static function I64Ctz(): Numeric\I64Ctz
{
return new Numeric\I64Ctz();
}
+
final public static function I64DivS(): Numeric\I64DivS
{
return new Numeric\I64DivS();
}
+
final public static function I64DivU(): Numeric\I64DivU
{
return new Numeric\I64DivU();
}
+
final public static function I64Eq(): Numeric\I64Eq
{
return new Numeric\I64Eq();
}
+
final public static function I64Eqz(): Numeric\I64Eqz
{
return new Numeric\I64Eqz();
}
+
final public static function I64Extend16S(): Numeric\I64Extend16S
{
return new Numeric\I64Extend16S();
}
+
final public static function I64Extend32S(): Numeric\I64Extend32S
{
return new Numeric\I64Extend32S();
}
+
final public static function I64Extend8S(): Numeric\I64Extend8S
{
return new Numeric\I64Extend8S();
}
+
final public static function I64ExtendI32S(): Numeric\I64ExtendI32S
{
return new Numeric\I64ExtendI32S();
}
+
final public static function I64ExtendI32U(): Numeric\I64ExtendI32U
{
return new Numeric\I64ExtendI32U();
}
+
final public static function I64GeS(): Numeric\I64GeS
{
return new Numeric\I64GeS();
}
+
final public static function I64GeU(): Numeric\I64GeU
{
return new Numeric\I64GeU();
}
+
final public static function I64GtS(): Numeric\I64GtS
{
return new Numeric\I64GtS();
}
+
final public static function I64GtU(): Numeric\I64GtU
{
return new Numeric\I64GtU();
}
+
final public static function I64LeS(): Numeric\I64LeS
{
return new Numeric\I64LeS();
}
+
final public static function I64LeU(): Numeric\I64LeU
{
return new Numeric\I64LeU();
}
+
final public static function I64LtS(): Numeric\I64LtS
{
return new Numeric\I64LtS();
}
+
final public static function I64LtU(): Numeric\I64LtU
{
return new Numeric\I64LtU();
}
+
final public static function I64Mul(): Numeric\I64Mul
{
return new Numeric\I64Mul();
}
+
final public static function I64Ne(): Numeric\I64Ne
{
return new Numeric\I64Ne();
}
+
final public static function I64Or(): Numeric\I64Or
{
return new Numeric\I64Or();
}
+
final public static function I64Popcnt(): Numeric\I64Popcnt
{
return new Numeric\I64Popcnt();
}
+
final public static function I64ReinterpretF32(): Numeric\I64ReinterpretF32
{
return new Numeric\I64ReinterpretF32();
}
+
final public static function I64ReinterpretF64(): Numeric\I64ReinterpretF64
{
return new Numeric\I64ReinterpretF64();
}
+
final public static function I64RemS(): Numeric\I64RemS
{
return new Numeric\I64RemS();
}
+
final public static function I64RemU(): Numeric\I64RemU
{
return new Numeric\I64RemU();
}
+
final public static function I64RotL(): Numeric\I64RotL
{
return new Numeric\I64RotL();
}
+
final public static function I64RotR(): Numeric\I64RotR
{
return new Numeric\I64RotR();
}
+
final public static function I64Shl(): Numeric\I64Shl
{
return new Numeric\I64Shl();
}
+
final public static function I64ShrS(): Numeric\I64ShrS
{
return new Numeric\I64ShrS();
}
+
final public static function I64ShrU(): Numeric\I64ShrU
{
return new Numeric\I64ShrU();
}
+
final public static function I64Sub(): Numeric\I64Sub
{
return new Numeric\I64Sub();
}
+
final public static function I64TruncF32S(): Numeric\I64TruncF32S
{
return new Numeric\I64TruncF32S();
}
+
final public static function I64TruncF32U(): Numeric\I64TruncF32U
{
return new Numeric\I64TruncF32U();
}
+
final public static function I64TruncF64S(): Numeric\I64TruncF64S
{
return new Numeric\I64TruncF64S();
}
+
final public static function I64TruncF64U(): Numeric\I64TruncF64U
{
return new Numeric\I64TruncF64U();
}
+
final public static function I64TruncSatF32S(): Numeric\I64TruncSatF32S
{
return new Numeric\I64TruncSatF32S();
}
+
final public static function I64TruncSatF32U(): Numeric\I64TruncSatF32U
{
return new Numeric\I64TruncSatF32U();
}
+
final public static function I64TruncSatF64S(): Numeric\I64TruncSatF64S
{
return new Numeric\I64TruncSatF64S();
}
+
final public static function I64TruncSatF64U(): Numeric\I64TruncSatF64U
{
return new Numeric\I64TruncSatF64U();
}
+
final public static function I64Xor(): Numeric\I64Xor
{
return new Numeric\I64Xor();
@@ -611,10 +754,12 @@ abstract readonly class Instr
{
return new Reference\RefFunc($func);
}
+
final public static function RefIsNull(): Reference\RefIsNull
{
return new Reference\RefIsNull();
}
+
/**
* @param ValType::FuncRef|ValType::ExternRef $type
*/
@@ -628,6 +773,7 @@ abstract readonly class Instr
{
return new Parametric\Drop();
}
+
/**
* @param list<ValType> $types
*/
@@ -641,18 +787,22 @@ abstract readonly class Instr
{
return new Variable\GlobalGet($var);
}
+
final public static function GlobalSet(int $var): Variable\GlobalSet
{
return new Variable\GlobalSet($var);
}
+
final public static function LocalGet(int $var): Variable\LocalGet
{
return new Variable\LocalGet($var);
}
+
final public static function LocalSet(int $var): Variable\LocalSet
{
return new Variable\LocalSet($var);
}
+
final public static function LocalTee(int $var): Variable\LocalTee
{
return new Variable\LocalTee($var);
@@ -663,30 +813,37 @@ abstract readonly class Instr
{
return new Table\ElemDrop($elem);
}
+
final public static function TableCopy(int $to, int $from): Table\TableCopy
{
return new Table\TableCopy($to, $from);
}
+
final public static function TableFill(int $table): Table\TableFill
{
return new Table\TableFill($table);
}
+
final public static function TableGet(int $table): Table\TableGet
{
return new Table\TableGet($table);
}
+
final public static function TableGrow(int $table): Table\TableGrow
{
return new Table\TableGrow($table);
}
+
final public static function TableInit(int $to, int $from): Table\TableInit
{
return new Table\TableInit($to, $from);
}
+
final public static function TableSet(int $table): Table\TableSet
{
return new Table\TableSet($table);
}
+
final public static function TableSize(int $table): Table\TableSize
{
return new Table\TableSize($table);
@@ -697,6 +854,7 @@ abstract readonly class Instr
{
return new Memory\DataDrop($data);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -705,6 +863,7 @@ abstract readonly class Instr
{
return new Memory\F32Load($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -713,6 +872,7 @@ abstract readonly class Instr
{
return new Memory\F32Store($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -721,6 +881,7 @@ abstract readonly class Instr
{
return new Memory\F64Load($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -729,6 +890,7 @@ abstract readonly class Instr
{
return new Memory\F64Store($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -737,6 +899,7 @@ abstract readonly class Instr
{
return new Memory\I32Load($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -745,6 +908,7 @@ abstract readonly class Instr
{
return new Memory\I32Load16S($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -753,6 +917,7 @@ abstract readonly class Instr
{
return new Memory\I32Load16U($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -761,6 +926,7 @@ abstract readonly class Instr
{
return new Memory\I32Load8S($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -769,6 +935,7 @@ abstract readonly class Instr
{
return new Memory\I32Load8U($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -777,6 +944,7 @@ abstract readonly class Instr
{
return new Memory\I32Store($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -785,6 +953,7 @@ abstract readonly class Instr
{
return new Memory\I32Store16($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -793,6 +962,7 @@ abstract readonly class Instr
{
return new Memory\I32Store8($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -801,6 +971,7 @@ abstract readonly class Instr
{
return new Memory\I64Load($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -809,6 +980,7 @@ abstract readonly class Instr
{
return new Memory\I64Load16S($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -817,6 +989,7 @@ abstract readonly class Instr
{
return new Memory\I64Load16U($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -825,6 +998,7 @@ abstract readonly class Instr
{
return new Memory\I64Load32S($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -833,6 +1007,7 @@ abstract readonly class Instr
{
return new Memory\I64Load32U($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -841,6 +1016,7 @@ abstract readonly class Instr
{
return new Memory\I64Load8S($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -849,6 +1025,7 @@ abstract readonly class Instr
{
return new Memory\I64Load8U($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -857,6 +1034,7 @@ abstract readonly class Instr
{
return new Memory\I64Store($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -865,6 +1043,7 @@ abstract readonly class Instr
{
return new Memory\I64Store16($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -873,6 +1052,7 @@ abstract readonly class Instr
{
return new Memory\I64Store32($offset, $align);
}
+
/**
* @param U32 $offset
* @param U32 $align
@@ -881,22 +1061,27 @@ abstract readonly class Instr
{
return new Memory\I64Store8($offset, $align);
}
+
final public static function MemoryCopy(): Memory\MemoryCopy
{
return new Memory\MemoryCopy();
}
+
final public static function MemoryFill(): Memory\MemoryFill
{
return new Memory\MemoryFill();
}
+
final public static function MemoryGrow(): Memory\MemoryGrow
{
return new Memory\MemoryGrow();
}
+
final public static function MemoryInit(int $data): Memory\MemoryInit
{
return new Memory\MemoryInit($data);
}
+
final public static function MemorySize(): Memory\MemorySize
{
return new Memory\MemorySize();
@@ -910,14 +1095,17 @@ abstract readonly class Instr
{
return new Control\Block($type, $body);
}
+
final public static function Br(int $label): Control\Br
{
return new Control\Br($label);
}
+
final public static function BrIf(int $label): Control\BrIf
{
return new Control\BrIf($label);
}
+
/**
* @param list<int> $labelTable
*/
@@ -925,22 +1113,27 @@ abstract readonly class Instr
{
return new Control\BrTable($labelTable, $defaultLabel);
}
+
final public static function Call(int $func): Control\Call
{
return new Control\Call($func);
}
+
final public static function CallIndirect(int $funcTable, int $type): Control\CallIndirect
{
return new Control\CallIndirect($funcTable, $type);
}
+
final public static function Else_(): Control\Else_
{
return new Control\Else_();
}
+
final public static function End(): Control\End
{
return new Control\End();
}
+
/**
* @param list<Instr> $thenBody
* @param list<Instr> $elseBody
@@ -949,6 +1142,7 @@ abstract readonly class Instr
{
return new Control\If_($type, $thenBody, $elseBody);
}
+
/**
* @param list<Instr> $body
*/
@@ -956,14 +1150,17 @@ abstract readonly class Instr
{
return new Control\Loop($type, $body);
}
+
final public static function Nop(): Control\Nop
{
return new Control\Nop();
}
+
final public static function Return_(): Control\Return_
{
return new Control\Return_();
}
+
final public static function Unreachable(): Control\Unreachable
{
return new Control\Unreachable();
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php
index af2c97f..dad17d1 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php
@@ -19,6 +19,6 @@ final readonly class Block extends Instr
public static function opName(): string
{
- return "block";
+ return 'block';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockType.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockType.php
index 1188625..d52a74d 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockType.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockType.php
@@ -20,6 +20,6 @@ abstract readonly class BlockType
public static function opName(): string
{
- return "hoge";
+ return 'hoge';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php
index 2ed694b..4ce2781 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php
@@ -8,7 +8,8 @@ use Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instrs\Control\BlockTyp
final readonly class TypeIdx extends BlockType
{
- protected function __construct(public int $inner)
- {
+ protected function __construct(
+ public int $inner
+ ) {
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php
index e7caa3f..2142ca3 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php
@@ -9,12 +9,13 @@ use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ValType as OrigValType;
final readonly class ValType extends BlockType
{
- protected function __construct(public ?OrigValType $inner)
- {
+ protected function __construct(
+ public ?OrigValType $inner
+ ) {
}
public static function opName(): string
{
- return "hoge";
+ return 'hoge';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Br.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Br.php
index 6235a36..e0a34ca 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/Br.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Br.php
@@ -15,6 +15,6 @@ final readonly class Br extends Instr
public static function opName(): string
{
- return "br";
+ return 'br';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/BrIf.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/BrIf.php
index 7c8a896..2078f60 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/BrIf.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/BrIf.php
@@ -15,6 +15,6 @@ final readonly class BrIf extends Instr
public static function opName(): string
{
- return "br_if";
+ return 'br_if';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/BrTable.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/BrTable.php
index 2841814..d4c6ab5 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/BrTable.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/BrTable.php
@@ -19,6 +19,6 @@ final readonly class BrTable extends Instr
public static function opName(): string
{
- return "br_table";
+ return 'br_table';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Call.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Call.php
index 461f561..1cbfa11 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/Call.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Call.php
@@ -15,6 +15,6 @@ final readonly class Call extends Instr
public static function opName(): string
{
- return "call";
+ return 'call';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/CallIndirect.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/CallIndirect.php
index 7017723..c187e9c 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/CallIndirect.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/CallIndirect.php
@@ -16,6 +16,6 @@ final readonly class CallIndirect extends Instr
public static function opName(): string
{
- return "call_indirect";
+ return 'call_indirect';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Else_.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Else_.php
index 1407543..eeded56 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/Else_.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Else_.php
@@ -10,6 +10,6 @@ final readonly class Else_ extends Instr
{
public static function opName(): string
{
- return "else";
+ return 'else';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/End.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/End.php
index 5bdb8b9..f474677 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/End.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/End.php
@@ -10,6 +10,6 @@ final readonly class End extends Instr
{
public static function opName(): string
{
- return "end";
+ return 'end';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/If_.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/If_.php
index 8afdc8b..0cfb4aa 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/If_.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/If_.php
@@ -21,6 +21,6 @@ final readonly class If_ extends Instr
public static function opName(): string
{
- return "if";
+ return 'if';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Loop.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Loop.php
index ca48ca1..43b8f3a 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/Loop.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Loop.php
@@ -19,6 +19,6 @@ final readonly class Loop extends Instr
public static function opName(): string
{
- return "loop";
+ return 'loop';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Nop.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Nop.php
index 50a3773..f3668f9 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/Nop.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Nop.php
@@ -10,6 +10,6 @@ final readonly class Nop extends Instr
{
public static function opName(): string
{
- return "nop";
+ return 'nop';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Return_.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Return_.php
index b80fdfe..ef16421 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/Return_.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Return_.php
@@ -10,6 +10,6 @@ final readonly class Return_ extends Instr
{
public static function opName(): string
{
- return "return";
+ return 'return';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Unreachable.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Unreachable.php
index e43ade8..cf3e31b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Control/Unreachable.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Unreachable.php
@@ -10,6 +10,6 @@ final readonly class Unreachable extends Instr
{
public static function opName(): string
{
- return "unreachable";
+ return 'unreachable';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/DataDrop.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/DataDrop.php
index 3525b80..92ac3d1 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/DataDrop.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/DataDrop.php
@@ -15,6 +15,6 @@ final readonly class DataDrop extends Instr
public static function opName(): string
{
- return "data.drop";
+ return 'data.drop';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Load.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Load.php
index 82b7cf4..bb4d8e5 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Load.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Load.php
@@ -20,6 +20,6 @@ final readonly class F32Load extends Instr
public static function opName(): string
{
- return "f32.load";
+ return 'f32.load';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Store.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Store.php
index 06d9055..f6f779a 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Store.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Store.php
@@ -20,6 +20,6 @@ final readonly class F32Store extends Instr
public static function opName(): string
{
- return "f32.store";
+ return 'f32.store';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Load.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Load.php
index 13e2385..0f5281b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Load.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Load.php
@@ -20,6 +20,6 @@ final readonly class F64Load extends Instr
public static function opName(): string
{
- return "f64.load";
+ return 'f64.load';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Store.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Store.php
index 261b276..f37f21b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Store.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Store.php
@@ -20,6 +20,6 @@ final readonly class F64Store extends Instr
public static function opName(): string
{
- return "f64.store";
+ return 'f64.store';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load.php
index 4554a77..911313f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load.php
@@ -20,6 +20,6 @@ final readonly class I32Load extends Instr
public static function opName(): string
{
- return "i32.load";
+ return 'i32.load';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16S.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16S.php
index 56bdb3f..4ccc40a 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16S.php
@@ -20,6 +20,6 @@ final readonly class I32Load16S extends Instr
public static function opName(): string
{
- return "i32.load16_s";
+ return 'i32.load16_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16U.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16U.php
index 1cc243c..6217829 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16U.php
@@ -20,6 +20,6 @@ final readonly class I32Load16U extends Instr
public static function opName(): string
{
- return "i32.load16_u";
+ return 'i32.load16_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8S.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8S.php
index a76607f..46582bc 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8S.php
@@ -20,6 +20,6 @@ final readonly class I32Load8S extends Instr
public static function opName(): string
{
- return "i32.load8_s";
+ return 'i32.load8_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8U.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8U.php
index 7cab471..96db932 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8U.php
@@ -20,6 +20,6 @@ final readonly class I32Load8U extends Instr
public static function opName(): string
{
- return "i32.load8_u";
+ return 'i32.load8_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store.php
index 3021639..168dad0 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store.php
@@ -20,6 +20,6 @@ final readonly class I32Store extends Instr
public static function opName(): string
{
- return "i32.store";
+ return 'i32.store';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store16.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store16.php
index 3463fdf..55a387b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store16.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store16.php
@@ -20,6 +20,6 @@ final readonly class I32Store16 extends Instr
public static function opName(): string
{
- return "i32.store16";
+ return 'i32.store16';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store8.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store8.php
index 5298ad5..d5a90bb 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store8.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store8.php
@@ -20,6 +20,6 @@ final readonly class I32Store8 extends Instr
public static function opName(): string
{
- return "i32.store8";
+ return 'i32.store8';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load.php
index 33fa4e1..74ae53c 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load.php
@@ -20,6 +20,6 @@ final readonly class I64Load extends Instr
public static function opName(): string
{
- return "i64.load";
+ return 'i64.load';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16S.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16S.php
index 47ef776..936d5b7 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16S.php
@@ -20,6 +20,6 @@ final readonly class I64Load16S extends Instr
public static function opName(): string
{
- return "i64.load16_s";
+ return 'i64.load16_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16U.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16U.php
index 8825b89..a0cae75 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16U.php
@@ -20,6 +20,6 @@ final readonly class I64Load16U extends Instr
public static function opName(): string
{
- return "i64.load16_u";
+ return 'i64.load16_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32S.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32S.php
index bd2575b..df3db30 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32S.php
@@ -20,6 +20,6 @@ final readonly class I64Load32S extends Instr
public static function opName(): string
{
- return "i64.load32_s";
+ return 'i64.load32_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32U.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32U.php
index 404bc8a..50f290e 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32U.php
@@ -20,6 +20,6 @@ final readonly class I64Load32U extends Instr
public static function opName(): string
{
- return "i64.load32_u";
+ return 'i64.load32_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8S.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8S.php
index f28bad9..b2fb279 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8S.php
@@ -20,6 +20,6 @@ final readonly class I64Load8S extends Instr
public static function opName(): string
{
- return "i64.load8_s";
+ return 'i64.load8_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8U.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8U.php
index 66b5575..1d9cc72 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8U.php
@@ -20,6 +20,6 @@ final readonly class I64Load8U extends Instr
public static function opName(): string
{
- return "i64.load8_u";
+ return 'i64.load8_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store.php
index 0b4778b..682f698 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store.php
@@ -20,6 +20,6 @@ final readonly class I64Store extends Instr
public static function opName(): string
{
- return "i64.store";
+ return 'i64.store';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store16.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store16.php
index 984ecd2..5b2e1fe 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store16.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store16.php
@@ -20,6 +20,6 @@ final readonly class I64Store16 extends Instr
public static function opName(): string
{
- return "i64.store16";
+ return 'i64.store16';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store32.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store32.php
index e486308..22bef5e 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store32.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store32.php
@@ -20,6 +20,6 @@ final readonly class I64Store32 extends Instr
public static function opName(): string
{
- return "i64.store32";
+ return 'i64.store32';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store8.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store8.php
index 7897197..1703419 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store8.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store8.php
@@ -20,6 +20,6 @@ final readonly class I64Store8 extends Instr
public static function opName(): string
{
- return "i64.store8";
+ return 'i64.store8';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryCopy.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryCopy.php
index 5ef7106..626780f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryCopy.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryCopy.php
@@ -10,6 +10,6 @@ final readonly class MemoryCopy extends Instr
{
public static function opName(): string
{
- return "memory.copy";
+ return 'memory.copy';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryFill.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryFill.php
index be388ff..2df1777 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryFill.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryFill.php
@@ -10,6 +10,6 @@ final readonly class MemoryFill extends Instr
{
public static function opName(): string
{
- return "memory.fill";
+ return 'memory.fill';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryGrow.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryGrow.php
index 9e6c320..6169f91 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryGrow.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryGrow.php
@@ -10,6 +10,6 @@ final readonly class MemoryGrow extends Instr
{
public static function opName(): string
{
- return "memory.grow";
+ return 'memory.grow';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryInit.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryInit.php
index 7843ff1..cf44ff2 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryInit.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryInit.php
@@ -15,6 +15,6 @@ final readonly class MemoryInit extends Instr
public static function opName(): string
{
- return "memory.init";
+ return 'memory.init';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemorySize.php b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemorySize.php
index 075878a..d832766 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemorySize.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Memory/MemorySize.php
@@ -10,6 +10,6 @@ final readonly class MemorySize extends Instr
{
public static function opName(): string
{
- return "memory.size";
+ return 'memory.size';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Abs.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Abs.php
index 7711f7f..b9d840b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Abs.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Abs.php
@@ -10,6 +10,6 @@ final readonly class F32Abs extends Instr
{
public static function opName(): string
{
- return "f32.abs";
+ return 'f32.abs';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Add.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Add.php
index 5f92829..7533d03 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Add.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Add.php
@@ -10,6 +10,6 @@ final readonly class F32Add extends Instr
{
public static function opName(): string
{
- return "f32.add";
+ return 'f32.add';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ceil.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ceil.php
index be6f11e..a55b6f8 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ceil.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ceil.php
@@ -10,6 +10,6 @@ final readonly class F32Ceil extends Instr
{
public static function opName(): string
{
- return "f32.ceil";
+ return 'f32.ceil';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Const.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Const.php
index fd2670e..8ad8bdc 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Const.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Const.php
@@ -18,6 +18,6 @@ final readonly class F32Const extends Instr
public static function opName(): string
{
- return "f32.const";
+ return 'f32.const';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32S.php
index 5e68989..89f99eb 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32S.php
@@ -10,6 +10,6 @@ final readonly class F32ConvertI32S extends Instr
{
public static function opName(): string
{
- return "f32.convert_i32_s";
+ return 'f32.convert_i32_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32U.php
index fdaa709..76ccdc1 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32U.php
@@ -10,6 +10,6 @@ final readonly class F32ConvertI32U extends Instr
{
public static function opName(): string
{
- return "f32.convert_i32_u";
+ return 'f32.convert_i32_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64S.php
index b6444cc..86ed3dd 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64S.php
@@ -10,6 +10,6 @@ final readonly class F32ConvertI64S extends Instr
{
public static function opName(): string
{
- return "f32.convert_i64_s";
+ return 'f32.convert_i64_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64U.php
index 4b0f578..1cd0ffd 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64U.php
@@ -10,6 +10,6 @@ final readonly class F32ConvertI64U extends Instr
{
public static function opName(): string
{
- return "f32.convert_i64_u";
+ return 'f32.convert_i64_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32CopySign.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32CopySign.php
index 539682a..321ef58 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32CopySign.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32CopySign.php
@@ -10,6 +10,6 @@ final readonly class F32CopySign extends Instr
{
public static function opName(): string
{
- return "f32.copy_sign";
+ return 'f32.copy_sign';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32DemoteF64.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32DemoteF64.php
index 24cff4f..b246d47 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32DemoteF64.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32DemoteF64.php
@@ -10,6 +10,6 @@ final readonly class F32DemoteF64 extends Instr
{
public static function opName(): string
{
- return "f32.demote_f64";
+ return 'f32.demote_f64';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Div.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Div.php
index 3cdafb0..9cc0c7f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Div.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Div.php
@@ -10,6 +10,6 @@ final readonly class F32Div extends Instr
{
public static function opName(): string
{
- return "f32.div";
+ return 'f32.div';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Eq.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Eq.php
index cae6c2e..9065109 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Eq.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Eq.php
@@ -10,6 +10,6 @@ final readonly class F32Eq extends Instr
{
public static function opName(): string
{
- return "f32.eq";
+ return 'f32.eq';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Floor.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Floor.php
index 9c1b23f..4e1a1b8 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Floor.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Floor.php
@@ -10,6 +10,6 @@ final readonly class F32Floor extends Instr
{
public static function opName(): string
{
- return "f32.floor";
+ return 'f32.floor';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ge.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ge.php
index ef75922..9efe5d1 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ge.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ge.php
@@ -10,6 +10,6 @@ final readonly class F32Ge extends Instr
{
public static function opName(): string
{
- return "f32.ge";
+ return 'f32.ge';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Gt.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Gt.php
index 0efda96..e1a2364 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Gt.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Gt.php
@@ -10,6 +10,6 @@ final readonly class F32Gt extends Instr
{
public static function opName(): string
{
- return "f32.gt";
+ return 'f32.gt';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Le.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Le.php
index 50cbb71..1bdee4b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Le.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Le.php
@@ -10,6 +10,6 @@ final readonly class F32Le extends Instr
{
public static function opName(): string
{
- return "f32.le";
+ return 'f32.le';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Lt.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Lt.php
index e4b490a..90c5052 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Lt.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Lt.php
@@ -10,6 +10,6 @@ final readonly class F32Lt extends Instr
{
public static function opName(): string
{
- return "f32.lt";
+ return 'f32.lt';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Max.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Max.php
index 81f9b3e..b3256c4 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Max.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Max.php
@@ -10,6 +10,6 @@ final readonly class F32Max extends Instr
{
public static function opName(): string
{
- return "f32.max";
+ return 'f32.max';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Min.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Min.php
index 20518ea..d88cbbf 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Min.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Min.php
@@ -10,6 +10,6 @@ final readonly class F32Min extends Instr
{
public static function opName(): string
{
- return "f32.min";
+ return 'f32.min';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Mul.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Mul.php
index 8282273..af0ad4e 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Mul.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Mul.php
@@ -10,6 +10,6 @@ final readonly class F32Mul extends Instr
{
public static function opName(): string
{
- return "f32.mul";
+ return 'f32.mul';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ne.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ne.php
index 8b5db5e..73e2df5 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ne.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ne.php
@@ -10,6 +10,6 @@ final readonly class F32Ne extends Instr
{
public static function opName(): string
{
- return "f32.ne";
+ return 'f32.ne';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Nearest.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Nearest.php
index ae51359..eb95566 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Nearest.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Nearest.php
@@ -10,6 +10,6 @@ final readonly class F32Nearest extends Instr
{
public static function opName(): string
{
- return "f32.nearest";
+ return 'f32.nearest';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Neg.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Neg.php
index 82b72c3..f8ee84a 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Neg.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Neg.php
@@ -10,6 +10,6 @@ final readonly class F32Neg extends Instr
{
public static function opName(): string
{
- return "f32.neg";
+ return 'f32.neg';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI32.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI32.php
index 3cd93c4..93df2a5 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI32.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI32.php
@@ -10,6 +10,6 @@ final readonly class F32ReinterpretI32 extends Instr
{
public static function opName(): string
{
- return "f32.reinterpret_i32";
+ return 'f32.reinterpret_i32';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI64.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI64.php
index dd0f66f..cd6ffed 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI64.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI64.php
@@ -10,6 +10,6 @@ final readonly class F32ReinterpretI64 extends Instr
{
public static function opName(): string
{
- return "f32.reinterpret_i64";
+ return 'f32.reinterpret_i64';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sqrt.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sqrt.php
index 9cdeba2..f543992 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sqrt.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sqrt.php
@@ -10,6 +10,6 @@ final readonly class F32Sqrt extends Instr
{
public static function opName(): string
{
- return "f32.sqrt";
+ return 'f32.sqrt';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sub.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sub.php
index 54b5991..3ffc448 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sub.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sub.php
@@ -10,6 +10,6 @@ final readonly class F32Sub extends Instr
{
public static function opName(): string
{
- return "f32.sub";
+ return 'f32.sub';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Trunc.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Trunc.php
index 627406e..cedf772 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Trunc.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Trunc.php
@@ -10,6 +10,6 @@ final readonly class F32Trunc extends Instr
{
public static function opName(): string
{
- return "f32.trunc";
+ return 'f32.trunc';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Abs.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Abs.php
index a985933..0310718 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Abs.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Abs.php
@@ -10,6 +10,6 @@ final readonly class F64Abs extends Instr
{
public static function opName(): string
{
- return "f64.abs";
+ return 'f64.abs';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Add.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Add.php
index 60a6a05..44f6ef6 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Add.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Add.php
@@ -10,6 +10,6 @@ final readonly class F64Add extends Instr
{
public static function opName(): string
{
- return "f64.add";
+ return 'f64.add';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ceil.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ceil.php
index 3c88a4b..9e9682e 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ceil.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ceil.php
@@ -10,6 +10,6 @@ final readonly class F64Ceil extends Instr
{
public static function opName(): string
{
- return "f64.ceil";
+ return 'f64.ceil';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Const.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Const.php
index 46c61fe..f6a07d1 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Const.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Const.php
@@ -18,6 +18,6 @@ final readonly class F64Const extends Instr
public static function opName(): string
{
- return "f64.const";
+ return 'f64.const';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32S.php
index 5deaec0..5083bae 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32S.php
@@ -10,6 +10,6 @@ final readonly class F64ConvertI32S extends Instr
{
public static function opName(): string
{
- return "f64.convert_i32_s";
+ return 'f64.convert_i32_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32U.php
index 657e8e2..81a9fa2 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32U.php
@@ -10,6 +10,6 @@ final readonly class F64ConvertI32U extends Instr
{
public static function opName(): string
{
- return "f64.convert_i32_u";
+ return 'f64.convert_i32_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64S.php
index af7d5af..e96c1c8 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64S.php
@@ -10,6 +10,6 @@ final readonly class F64ConvertI64S extends Instr
{
public static function opName(): string
{
- return "f64.convert_i64_s";
+ return 'f64.convert_i64_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64U.php
index 575c8e5..695e9f9 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64U.php
@@ -10,6 +10,6 @@ final readonly class F64ConvertI64U extends Instr
{
public static function opName(): string
{
- return "f64.convert_i64_u";
+ return 'f64.convert_i64_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64CopySign.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64CopySign.php
index bab91f2..30adb81 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64CopySign.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64CopySign.php
@@ -10,6 +10,6 @@ final readonly class F64CopySign extends Instr
{
public static function opName(): string
{
- return "f64.copy_sign";
+ return 'f64.copy_sign';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Div.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Div.php
index 7304a8d..4dd0f91 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Div.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Div.php
@@ -10,6 +10,6 @@ final readonly class F64Div extends Instr
{
public static function opName(): string
{
- return "f64.div";
+ return 'f64.div';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Eq.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Eq.php
index 1c9e31c..ad71877 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Eq.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Eq.php
@@ -10,6 +10,6 @@ final readonly class F64Eq extends Instr
{
public static function opName(): string
{
- return "f64.eq";
+ return 'f64.eq';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Floor.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Floor.php
index 8c76753..e08fe42 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Floor.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Floor.php
@@ -10,6 +10,6 @@ final readonly class F64Floor extends Instr
{
public static function opName(): string
{
- return "f64.floor";
+ return 'f64.floor';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ge.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ge.php
index 28f6da1..c5666f1 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ge.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ge.php
@@ -10,6 +10,6 @@ final readonly class F64Ge extends Instr
{
public static function opName(): string
{
- return "f64.ge";
+ return 'f64.ge';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Gt.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Gt.php
index 9b6e91e..869d84c 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Gt.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Gt.php
@@ -10,6 +10,6 @@ final readonly class F64Gt extends Instr
{
public static function opName(): string
{
- return "f64.gt";
+ return 'f64.gt';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Le.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Le.php
index 1852d66..92c20fc 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Le.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Le.php
@@ -10,6 +10,6 @@ final readonly class F64Le extends Instr
{
public static function opName(): string
{
- return "f64.le";
+ return 'f64.le';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Lt.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Lt.php
index fb96301..c6342f8 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Lt.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Lt.php
@@ -10,6 +10,6 @@ final readonly class F64Lt extends Instr
{
public static function opName(): string
{
- return "f64.lt";
+ return 'f64.lt';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Max.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Max.php
index da79a2e..bcae32f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Max.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Max.php
@@ -10,6 +10,6 @@ final readonly class F64Max extends Instr
{
public static function opName(): string
{
- return "f64.max";
+ return 'f64.max';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Min.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Min.php
index 79bb77b..1162096 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Min.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Min.php
@@ -10,6 +10,6 @@ final readonly class F64Min extends Instr
{
public static function opName(): string
{
- return "f64.min";
+ return 'f64.min';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Mul.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Mul.php
index f0932ea..bd67a55 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Mul.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Mul.php
@@ -10,6 +10,6 @@ final readonly class F64Mul extends Instr
{
public static function opName(): string
{
- return "f64.mul";
+ return 'f64.mul';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ne.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ne.php
index 226b1e4..01230ba 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ne.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ne.php
@@ -10,6 +10,6 @@ final readonly class F64Ne extends Instr
{
public static function opName(): string
{
- return "f64.ne";
+ return 'f64.ne';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Nearest.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Nearest.php
index 0863099..15800b6 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Nearest.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Nearest.php
@@ -10,6 +10,6 @@ final readonly class F64Nearest extends Instr
{
public static function opName(): string
{
- return "f64.nearest";
+ return 'f64.nearest';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Neg.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Neg.php
index c4e0ce7..b23c121 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Neg.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Neg.php
@@ -10,6 +10,6 @@ final readonly class F64Neg extends Instr
{
public static function opName(): string
{
- return "f64.neg";
+ return 'f64.neg';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64PromoteF32.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64PromoteF32.php
index 8692806..e32a2ba 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64PromoteF32.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64PromoteF32.php
@@ -10,6 +10,6 @@ final readonly class F64PromoteF32 extends Instr
{
public static function opName(): string
{
- return "f64.promote_f32";
+ return 'f64.promote_f32';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI32.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI32.php
index 4721e07..f8cc8f8 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI32.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI32.php
@@ -10,6 +10,6 @@ final readonly class F64ReinterpretI32 extends Instr
{
public static function opName(): string
{
- return "f64.reinterpret_i32";
+ return 'f64.reinterpret_i32';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI64.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI64.php
index 22faa67..8ea03cb 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI64.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI64.php
@@ -10,6 +10,6 @@ final readonly class F64ReinterpretI64 extends Instr
{
public static function opName(): string
{
- return "f64.reinterpret_i64";
+ return 'f64.reinterpret_i64';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sqrt.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sqrt.php
index 77d708a..21ae279 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sqrt.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sqrt.php
@@ -10,6 +10,6 @@ final readonly class F64Sqrt extends Instr
{
public static function opName(): string
{
- return "f64.sqrt";
+ return 'f64.sqrt';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sub.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sub.php
index b20c0c9..154e939 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sub.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sub.php
@@ -10,6 +10,6 @@ final readonly class F64Sub extends Instr
{
public static function opName(): string
{
- return "f64.sub";
+ return 'f64.sub';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Trunc.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Trunc.php
index 62d6c12..5fe7e77 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Trunc.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Trunc.php
@@ -10,6 +10,6 @@ final readonly class F64Trunc extends Instr
{
public static function opName(): string
{
- return "f64.trunc";
+ return 'f64.trunc';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Add.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Add.php
index 429dfdf..93d583d 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Add.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Add.php
@@ -10,6 +10,6 @@ final readonly class I32Add extends Instr
{
public static function opName(): string
{
- return "i32.add";
+ return 'i32.add';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32And.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32And.php
index 135f038..08f55e8 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32And.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32And.php
@@ -10,6 +10,6 @@ final readonly class I32And extends Instr
{
public static function opName(): string
{
- return "i32.and";
+ return 'i32.and';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Clz.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Clz.php
index 7bdfa52..15d276a 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Clz.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Clz.php
@@ -10,6 +10,6 @@ final readonly class I32Clz extends Instr
{
public static function opName(): string
{
- return "i32.clz";
+ return 'i32.clz';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Const.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Const.php
index 4900a1c..158a505 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Const.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Const.php
@@ -18,6 +18,6 @@ final readonly class I32Const extends Instr
public static function opName(): string
{
- return "i32.const";
+ return 'i32.const';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ctz.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ctz.php
index 4577729..479c200 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ctz.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ctz.php
@@ -10,6 +10,6 @@ final readonly class I32Ctz extends Instr
{
public static function opName(): string
{
- return "i32.ctz";
+ return 'i32.ctz';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivS.php
index bbc0f08..7bb3e0b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivS.php
@@ -10,6 +10,6 @@ final readonly class I32DivS extends Instr
{
public static function opName(): string
{
- return "i32.div_s";
+ return 'i32.div_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivU.php
index 3db3fa0..4338283 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivU.php
@@ -10,6 +10,6 @@ final readonly class I32DivU extends Instr
{
public static function opName(): string
{
- return "i32.div_u";
+ return 'i32.div_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eq.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eq.php
index eb24aad..dab80c0 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eq.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eq.php
@@ -10,6 +10,6 @@ final readonly class I32Eq extends Instr
{
public static function opName(): string
{
- return "i32.eq";
+ return 'i32.eq';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eqz.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eqz.php
index b99341a..df0dda8 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eqz.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eqz.php
@@ -10,6 +10,6 @@ final readonly class I32Eqz extends Instr
{
public static function opName(): string
{
- return "i32.eqz";
+ return 'i32.eqz';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend16S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend16S.php
index 50e3951..3779301 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend16S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend16S.php
@@ -10,6 +10,6 @@ final readonly class I32Extend16S extends Instr
{
public static function opName(): string
{
- return "i32.extend16_s";
+ return 'i32.extend16_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend8S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend8S.php
index 9f5aa4b..8481cff 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend8S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend8S.php
@@ -10,6 +10,6 @@ final readonly class I32Extend8S extends Instr
{
public static function opName(): string
{
- return "i32.extend8_s";
+ return 'i32.extend8_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeS.php
index 7f2746f..3b477ae 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeS.php
@@ -10,6 +10,6 @@ final readonly class I32GeS extends Instr
{
public static function opName(): string
{
- return "i32.ge_s";
+ return 'i32.ge_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeU.php
index 3018605..822755b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeU.php
@@ -10,6 +10,6 @@ final readonly class I32GeU extends Instr
{
public static function opName(): string
{
- return "i32.ge_u";
+ return 'i32.ge_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtS.php
index 093f47d..4e73cbd 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtS.php
@@ -10,6 +10,6 @@ final readonly class I32GtS extends Instr
{
public static function opName(): string
{
- return "i32.gt_s";
+ return 'i32.gt_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtU.php
index e7c07e3..2be263f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtU.php
@@ -10,6 +10,6 @@ final readonly class I32GtU extends Instr
{
public static function opName(): string
{
- return "i32.gt_u";
+ return 'i32.gt_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeS.php
index 078535a..90b9225 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeS.php
@@ -10,6 +10,6 @@ final readonly class I32LeS extends Instr
{
public static function opName(): string
{
- return "i32.le_s";
+ return 'i32.le_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeU.php
index 0fe2ae2..6454c59 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeU.php
@@ -10,6 +10,6 @@ final readonly class I32LeU extends Instr
{
public static function opName(): string
{
- return "i32.le_u";
+ return 'i32.le_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtS.php
index 6070881..b66e6db 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtS.php
@@ -10,6 +10,6 @@ final readonly class I32LtS extends Instr
{
public static function opName(): string
{
- return "i32.lt_s";
+ return 'i32.lt_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtU.php
index ccb520e..fc56e52 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtU.php
@@ -10,6 +10,6 @@ final readonly class I32LtU extends Instr
{
public static function opName(): string
{
- return "i32.lt_u";
+ return 'i32.lt_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Mul.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Mul.php
index 7ddf1e6..830488c 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Mul.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Mul.php
@@ -10,6 +10,6 @@ final readonly class I32Mul extends Instr
{
public static function opName(): string
{
- return "i32.mul";
+ return 'i32.mul';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ne.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ne.php
index 7624909..4571260 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ne.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ne.php
@@ -10,6 +10,6 @@ final readonly class I32Ne extends Instr
{
public static function opName(): string
{
- return "i32.ne";
+ return 'i32.ne';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Or.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Or.php
index 4d985a7..1608154 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Or.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Or.php
@@ -10,6 +10,6 @@ final readonly class I32Or extends Instr
{
public static function opName(): string
{
- return "i32.or";
+ return 'i32.or';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Popcnt.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Popcnt.php
index ea2e5af..eba519b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Popcnt.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Popcnt.php
@@ -10,6 +10,6 @@ final readonly class I32Popcnt extends Instr
{
public static function opName(): string
{
- return "i32.popcnt";
+ return 'i32.popcnt';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF32.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF32.php
index 3ca1a3c..34592bd 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF32.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF32.php
@@ -10,6 +10,6 @@ final readonly class I32ReinterpretF32 extends Instr
{
public static function opName(): string
{
- return "i32.reinterpret_f32";
+ return 'i32.reinterpret_f32';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF64.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF64.php
index 2990a21..eeef365 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF64.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF64.php
@@ -10,6 +10,6 @@ final readonly class I32ReinterpretF64 extends Instr
{
public static function opName(): string
{
- return "i32.reinterpret_f64";
+ return 'i32.reinterpret_f64';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemS.php
index 0814085..941909e 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemS.php
@@ -10,6 +10,6 @@ final readonly class I32RemS extends Instr
{
public static function opName(): string
{
- return "i32.rem_s";
+ return 'i32.rem_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemU.php
index b945e4e..ad4eb89 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemU.php
@@ -10,6 +10,6 @@ final readonly class I32RemU extends Instr
{
public static function opName(): string
{
- return "i32.rem_u";
+ return 'i32.rem_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotL.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotL.php
index 509a39e..ec14e8f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotL.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotL.php
@@ -10,6 +10,6 @@ final readonly class I32RotL extends Instr
{
public static function opName(): string
{
- return "i32.rot_l";
+ return 'i32.rot_l';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotR.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotR.php
index 7104869..aeaf2b5 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotR.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotR.php
@@ -10,6 +10,6 @@ final readonly class I32RotR extends Instr
{
public static function opName(): string
{
- return "i32.rot_r";
+ return 'i32.rot_r';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Shl.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Shl.php
index 199cace..7a49bc7 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Shl.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Shl.php
@@ -10,6 +10,6 @@ final readonly class I32Shl extends Instr
{
public static function opName(): string
{
- return "i32.shl";
+ return 'i32.shl';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrS.php
index 5645907..df402da 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrS.php
@@ -10,6 +10,6 @@ final readonly class I32ShrS extends Instr
{
public static function opName(): string
{
- return "i32.shr_s";
+ return 'i32.shr_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrU.php
index c5435cd..31b5030 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrU.php
@@ -10,6 +10,6 @@ final readonly class I32ShrU extends Instr
{
public static function opName(): string
{
- return "i32.shr_u";
+ return 'i32.shr_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Sub.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Sub.php
index 5ca4dec..0f36534 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Sub.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Sub.php
@@ -10,6 +10,6 @@ final readonly class I32Sub extends Instr
{
public static function opName(): string
{
- return "i32.sub";
+ return 'i32.sub';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32S.php
index 31ab093..5082e56 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32S.php
@@ -10,6 +10,6 @@ final readonly class I32TruncF32S extends Instr
{
public static function opName(): string
{
- return "i32.trunc_f32_s";
+ return 'i32.trunc_f32_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32U.php
index afeda9c..f409676 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32U.php
@@ -10,6 +10,6 @@ final readonly class I32TruncF32U extends Instr
{
public static function opName(): string
{
- return "i32.trunc_f32_u";
+ return 'i32.trunc_f32_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64S.php
index 8b27805..f1917c0 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64S.php
@@ -10,6 +10,6 @@ final readonly class I32TruncF64S extends Instr
{
public static function opName(): string
{
- return "i32.trunc_f64_s";
+ return 'i32.trunc_f64_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64U.php
index 5b7550c..53fc762 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64U.php
@@ -10,6 +10,6 @@ final readonly class I32TruncF64U extends Instr
{
public static function opName(): string
{
- return "i32.trunc_f64_u";
+ return 'i32.trunc_f64_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32S.php
index c2fbdf1..419d5b9 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32S.php
@@ -10,6 +10,6 @@ final readonly class I32TruncSatF32S extends Instr
{
public static function opName(): string
{
- return "i32.trunc_sat_f32_s";
+ return 'i32.trunc_sat_f32_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32U.php
index 0ae1090..d585a2d 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32U.php
@@ -10,6 +10,6 @@ final readonly class I32TruncSatF32U extends Instr
{
public static function opName(): string
{
- return "i32.trunc_sat_f32_u";
+ return 'i32.trunc_sat_f32_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64S.php
index 38731db..36a4786 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64S.php
@@ -10,6 +10,6 @@ final readonly class I32TruncSatF64S extends Instr
{
public static function opName(): string
{
- return "i32.trunc_sat_f64_s";
+ return 'i32.trunc_sat_f64_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64U.php
index 22f5335..bc98b0c 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64U.php
@@ -10,6 +10,6 @@ final readonly class I32TruncSatF64U extends Instr
{
public static function opName(): string
{
- return "i32.trunc_sat_f64_u";
+ return 'i32.trunc_sat_f64_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32WrapI64.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32WrapI64.php
index 9c7ed4b..20d933d 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32WrapI64.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32WrapI64.php
@@ -10,6 +10,6 @@ final readonly class I32WrapI64 extends Instr
{
public static function opName(): string
{
- return "i32.wrap_i64";
+ return 'i32.wrap_i64';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Xor.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Xor.php
index 804b881..a5d875f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Xor.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Xor.php
@@ -10,6 +10,6 @@ final readonly class I32Xor extends Instr
{
public static function opName(): string
{
- return "i32.xor";
+ return 'i32.xor';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Add.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Add.php
index 9d81af7..e389057 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Add.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Add.php
@@ -10,6 +10,6 @@ final readonly class I64Add extends Instr
{
public static function opName(): string
{
- return "i64.add";
+ return 'i64.add';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64And.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64And.php
index 4c1f4b3..a53a405 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64And.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64And.php
@@ -10,6 +10,6 @@ final readonly class I64And extends Instr
{
public static function opName(): string
{
- return "i64.and";
+ return 'i64.and';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Clz.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Clz.php
index eb03da7..76fca42 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Clz.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Clz.php
@@ -10,6 +10,6 @@ final readonly class I64Clz extends Instr
{
public static function opName(): string
{
- return "i64.clz";
+ return 'i64.clz';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Const.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Const.php
index 01e9e72..48bdd56 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Const.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Const.php
@@ -18,6 +18,6 @@ final readonly class I64Const extends Instr
public static function opName(): string
{
- return "i64.const";
+ return 'i64.const';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ctz.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ctz.php
index 3c6fdaa..a512959 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ctz.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ctz.php
@@ -10,6 +10,6 @@ final readonly class I64Ctz extends Instr
{
public static function opName(): string
{
- return "i64.ctz";
+ return 'i64.ctz';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivS.php
index 8a8759b..85d7605 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivS.php
@@ -10,6 +10,6 @@ final readonly class I64DivS extends Instr
{
public static function opName(): string
{
- return "i64.div_s";
+ return 'i64.div_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivU.php
index 67f50f7..9b9ad5c 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivU.php
@@ -10,6 +10,6 @@ final readonly class I64DivU extends Instr
{
public static function opName(): string
{
- return "i64.div_u";
+ return 'i64.div_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eq.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eq.php
index 5480197..efdc589 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eq.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eq.php
@@ -10,6 +10,6 @@ final readonly class I64Eq extends Instr
{
public static function opName(): string
{
- return "i64.eq";
+ return 'i64.eq';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eqz.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eqz.php
index 8bd7f04..bfbb949 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eqz.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eqz.php
@@ -10,6 +10,6 @@ final readonly class I64Eqz extends Instr
{
public static function opName(): string
{
- return "i64.eqz";
+ return 'i64.eqz';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend16S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend16S.php
index 8733d84..da358dd 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend16S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend16S.php
@@ -10,6 +10,6 @@ final readonly class I64Extend16S extends Instr
{
public static function opName(): string
{
- return "i64.extend16_s";
+ return 'i64.extend16_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend32S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend32S.php
index 3594cf4..a57234a 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend32S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend32S.php
@@ -10,6 +10,6 @@ final readonly class I64Extend32S extends Instr
{
public static function opName(): string
{
- return "i64.extend32_s";
+ return 'i64.extend32_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend8S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend8S.php
index 8579635..6e29c3f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend8S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend8S.php
@@ -10,6 +10,6 @@ final readonly class I64Extend8S extends Instr
{
public static function opName(): string
{
- return "i64.extend8_s";
+ return 'i64.extend8_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32S.php
index 9db4c55..a7099d3 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32S.php
@@ -10,6 +10,6 @@ final readonly class I64ExtendI32S extends Instr
{
public static function opName(): string
{
- return "i64.extend_i32_s";
+ return 'i64.extend_i32_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32U.php
index 9219f97..999b201 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32U.php
@@ -10,6 +10,6 @@ final readonly class I64ExtendI32U extends Instr
{
public static function opName(): string
{
- return "i64.extend_i32_u";
+ return 'i64.extend_i32_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeS.php
index bddbffb..a087aff 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeS.php
@@ -10,6 +10,6 @@ final readonly class I64GeS extends Instr
{
public static function opName(): string
{
- return "i64.ge_s";
+ return 'i64.ge_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeU.php
index 9b5df84..3d08544 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeU.php
@@ -10,6 +10,6 @@ final readonly class I64GeU extends Instr
{
public static function opName(): string
{
- return "i64.ge_u";
+ return 'i64.ge_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtS.php
index 4ac4063..3fae36b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtS.php
@@ -10,6 +10,6 @@ final readonly class I64GtS extends Instr
{
public static function opName(): string
{
- return "i64.gt_s";
+ return 'i64.gt_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtU.php
index 4cd0f84..1f111c7 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtU.php
@@ -10,6 +10,6 @@ final readonly class I64GtU extends Instr
{
public static function opName(): string
{
- return "i64.gt_u";
+ return 'i64.gt_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeS.php
index 259cc99..cbd2508 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeS.php
@@ -10,6 +10,6 @@ final readonly class I64LeS extends Instr
{
public static function opName(): string
{
- return "i64.le_s";
+ return 'i64.le_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeU.php
index 69c880b..23a1c62 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeU.php
@@ -10,6 +10,6 @@ final readonly class I64LeU extends Instr
{
public static function opName(): string
{
- return "i64.le_u";
+ return 'i64.le_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtS.php
index 9c8d434..92df54c 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtS.php
@@ -10,6 +10,6 @@ final readonly class I64LtS extends Instr
{
public static function opName(): string
{
- return "i64.lt_s";
+ return 'i64.lt_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtU.php
index 8142792..c61a913 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtU.php
@@ -10,6 +10,6 @@ final readonly class I64LtU extends Instr
{
public static function opName(): string
{
- return "i64.lt_u";
+ return 'i64.lt_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Mul.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Mul.php
index 1a69448..f805bc5 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Mul.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Mul.php
@@ -10,6 +10,6 @@ final readonly class I64Mul extends Instr
{
public static function opName(): string
{
- return "i64.mul";
+ return 'i64.mul';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ne.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ne.php
index 4cf363e..3a02db1 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ne.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ne.php
@@ -10,6 +10,6 @@ final readonly class I64Ne extends Instr
{
public static function opName(): string
{
- return "i64.ne";
+ return 'i64.ne';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Or.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Or.php
index c09caab..a45ea43 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Or.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Or.php
@@ -10,6 +10,6 @@ final readonly class I64Or extends Instr
{
public static function opName(): string
{
- return "i64.or";
+ return 'i64.or';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Popcnt.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Popcnt.php
index 3db978b..6d3946b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Popcnt.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Popcnt.php
@@ -10,6 +10,6 @@ final readonly class I64Popcnt extends Instr
{
public static function opName(): string
{
- return "i64.popcnt";
+ return 'i64.popcnt';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF32.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF32.php
index 6446e50..4a53a6a 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF32.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF32.php
@@ -10,6 +10,6 @@ final readonly class I64ReinterpretF32 extends Instr
{
public static function opName(): string
{
- return "i64.reinterpret_f32";
+ return 'i64.reinterpret_f32';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF64.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF64.php
index b570008..9806e65 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF64.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF64.php
@@ -10,6 +10,6 @@ final readonly class I64ReinterpretF64 extends Instr
{
public static function opName(): string
{
- return "i64.reinterpret_f64";
+ return 'i64.reinterpret_f64';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemS.php
index 7833dcd..9deb79f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemS.php
@@ -10,6 +10,6 @@ final readonly class I64RemS extends Instr
{
public static function opName(): string
{
- return "i64.rem_s";
+ return 'i64.rem_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemU.php
index 97117dc..bc2e3a5 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemU.php
@@ -10,6 +10,6 @@ final readonly class I64RemU extends Instr
{
public static function opName(): string
{
- return "i64.rem_u";
+ return 'i64.rem_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotL.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotL.php
index b39a2ac..2860592 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotL.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotL.php
@@ -10,6 +10,6 @@ final readonly class I64RotL extends Instr
{
public static function opName(): string
{
- return "i64.rot_l";
+ return 'i64.rot_l';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotR.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotR.php
index aa62ee8..0e43898 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotR.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotR.php
@@ -10,6 +10,6 @@ final readonly class I64RotR extends Instr
{
public static function opName(): string
{
- return "i64.rot_r";
+ return 'i64.rot_r';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Shl.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Shl.php
index f43018a..4d33bf3 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Shl.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Shl.php
@@ -10,6 +10,6 @@ final readonly class I64Shl extends Instr
{
public static function opName(): string
{
- return "i64.shl";
+ return 'i64.shl';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrS.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrS.php
index f8da95e..0cbb961 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrS.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrS.php
@@ -10,6 +10,6 @@ final readonly class I64ShrS extends Instr
{
public static function opName(): string
{
- return "i64.shr_s";
+ return 'i64.shr_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrU.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrU.php
index 7ea2b3a..7e5871d 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrU.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrU.php
@@ -10,6 +10,6 @@ final readonly class I64ShrU extends Instr
{
public static function opName(): string
{
- return "i64.shr_u";
+ return 'i64.shr_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Sub.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Sub.php
index 7cb6f26..548db98 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Sub.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Sub.php
@@ -10,6 +10,6 @@ final readonly class I64Sub extends Instr
{
public static function opName(): string
{
- return "i64.sub";
+ return 'i64.sub';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32S.php
index 9f6ed66..1f0b71e 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32S.php
@@ -10,6 +10,6 @@ final readonly class I64TruncF32S extends Instr
{
public static function opName(): string
{
- return "i64.trunc_f32_s";
+ return 'i64.trunc_f32_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32U.php
index 9724897..f13ba9d 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32U.php
@@ -10,6 +10,6 @@ final readonly class I64TruncF32U extends Instr
{
public static function opName(): string
{
- return "i64.trunc_f32_u";
+ return 'i64.trunc_f32_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64S.php
index 70c235c..0b7b16b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64S.php
@@ -10,6 +10,6 @@ final readonly class I64TruncF64S extends Instr
{
public static function opName(): string
{
- return "i64.trunc_f64_s";
+ return 'i64.trunc_f64_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64U.php
index f787fe3..6f4ee3e 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64U.php
@@ -10,6 +10,6 @@ final readonly class I64TruncF64U extends Instr
{
public static function opName(): string
{
- return "i64.trunc_f64_u";
+ return 'i64.trunc_f64_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32S.php
index 98082e5..570e624 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32S.php
@@ -10,6 +10,6 @@ final readonly class I64TruncSatF32S extends Instr
{
public static function opName(): string
{
- return "i64.trunc_sat_f32_s";
+ return 'i64.trunc_sat_f32_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32U.php
index 6b0b833..5eec055 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32U.php
@@ -10,6 +10,6 @@ final readonly class I64TruncSatF32U extends Instr
{
public static function opName(): string
{
- return "i64.trunc_sat_f32_u";
+ return 'i64.trunc_sat_f32_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64S.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64S.php
index 2291eab..5834e1b 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64S.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64S.php
@@ -10,6 +10,6 @@ final readonly class I64TruncSatF64S extends Instr
{
public static function opName(): string
{
- return "i64.trunc_sat_f64_s";
+ return 'i64.trunc_sat_f64_s';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64U.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64U.php
index 90c1f49..48ab345 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64U.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64U.php
@@ -10,6 +10,6 @@ final readonly class I64TruncSatF64U extends Instr
{
public static function opName(): string
{
- return "i64.trunc_sat_f64_u";
+ return 'i64.trunc_sat_f64_u';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Xor.php b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Xor.php
index 994e47f..6e1ff45 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Xor.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Xor.php
@@ -10,6 +10,6 @@ final readonly class I64Xor extends Instr
{
public static function opName(): string
{
- return "i64.xor";
+ return 'i64.xor';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Parametric/Drop.php b/src/WebAssembly/Structure/Instructions/Instrs/Parametric/Drop.php
index 5a5ed18..1c87a8d 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Parametric/Drop.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Parametric/Drop.php
@@ -10,6 +10,6 @@ final readonly class Drop extends Instr
{
public static function opName(): string
{
- return "drop";
+ return 'drop';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Parametric/Select.php b/src/WebAssembly/Structure/Instructions/Instrs/Parametric/Select.php
index 2562764..1d8a6e0 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Parametric/Select.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Parametric/Select.php
@@ -19,6 +19,6 @@ final readonly class Select extends Instr
public static function opName(): string
{
- return "select";
+ return 'select';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefFunc.php b/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefFunc.php
index 3539ede..c3ba74f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefFunc.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefFunc.php
@@ -15,6 +15,6 @@ final readonly class RefFunc extends Instr
public static function opName(): string
{
- return "ref.func";
+ return 'ref.func';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefIsNull.php b/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefIsNull.php
index 21c9a26..94f8b6a 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefIsNull.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefIsNull.php
@@ -10,6 +10,6 @@ final readonly class RefIsNull extends Instr
{
public static function opName(): string
{
- return "ref.is_null";
+ return 'ref.is_null';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefNull.php b/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefNull.php
index ed5afff..0f0524d 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefNull.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefNull.php
@@ -19,6 +19,6 @@ final readonly class RefNull extends Instr
public static function opName(): string
{
- return "ref.null";
+ return 'ref.null';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Table/ElemDrop.php b/src/WebAssembly/Structure/Instructions/Instrs/Table/ElemDrop.php
index 4ead3cb..84d6c79 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Table/ElemDrop.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Table/ElemDrop.php
@@ -15,6 +15,6 @@ final readonly class ElemDrop extends Instr
public static function opName(): string
{
- return "elem.drop";
+ return 'elem.drop';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableCopy.php b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableCopy.php
index ca4e01a..fa6a405 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableCopy.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableCopy.php
@@ -16,6 +16,6 @@ final readonly class TableCopy extends Instr
public static function opName(): string
{
- return "table.copy";
+ return 'table.copy';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableFill.php b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableFill.php
index 8a8fba4..e255fbf 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableFill.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableFill.php
@@ -15,6 +15,6 @@ final readonly class TableFill extends Instr
public static function opName(): string
{
- return "table.fill";
+ return 'table.fill';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableGet.php b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableGet.php
index 0a562cb..a3a50cf 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableGet.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableGet.php
@@ -15,6 +15,6 @@ final readonly class TableGet extends Instr
public static function opName(): string
{
- return "table.get";
+ return 'table.get';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableGrow.php b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableGrow.php
index fae1bd0..9e73e67 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableGrow.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableGrow.php
@@ -15,6 +15,6 @@ final readonly class TableGrow extends Instr
public static function opName(): string
{
- return "table.grow";
+ return 'table.grow';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableInit.php b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableInit.php
index 221c938..5286d0a 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableInit.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableInit.php
@@ -16,6 +16,6 @@ final readonly class TableInit extends Instr
public static function opName(): string
{
- return "table.init";
+ return 'table.init';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableSet.php b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableSet.php
index 46ce56f..13f9680 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableSet.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableSet.php
@@ -15,6 +15,6 @@ final readonly class TableSet extends Instr
public static function opName(): string
{
- return "table.set";
+ return 'table.set';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableSize.php b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableSize.php
index 8a1625a..aa3b685 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Table/TableSize.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Table/TableSize.php
@@ -15,6 +15,6 @@ final readonly class TableSize extends Instr
public static function opName(): string
{
- return "table.size";
+ return 'table.size';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalGet.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalGet.php
index 2358325..90394b6 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalGet.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalGet.php
@@ -15,6 +15,6 @@ final readonly class GlobalGet extends Instr
public static function opName(): string
{
- return "global.get";
+ return 'global.get';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalSet.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalSet.php
index a8d2cf4..8b105bc 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalSet.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalSet.php
@@ -15,6 +15,6 @@ final readonly class GlobalSet extends Instr
public static function opName(): string
{
- return "global.set";
+ return 'global.set';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalGet.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalGet.php
index de610d3..2f5f0a7 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalGet.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalGet.php
@@ -15,6 +15,6 @@ final readonly class LocalGet extends Instr
public static function opName(): string
{
- return "local.get";
+ return 'local.get';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalSet.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalSet.php
index 350c6bd..21f554f 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalSet.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalSet.php
@@ -15,6 +15,6 @@ final readonly class LocalSet extends Instr
public static function opName(): string
{
- return "local.set";
+ return 'local.set';
}
}
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalTee.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalTee.php
index 62d42c5..c81d5af 100644
--- a/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalTee.php
+++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalTee.php
@@ -15,6 +15,6 @@ final readonly class LocalTee extends Instr
public static function opName(): string
{
- return "local.tee";
+ return 'local.tee';
}
}
diff --git a/src/WebAssembly/Structure/Types/FuncType.php b/src/WebAssembly/Structure/Types/FuncType.php
index 9ea2434..7932eb5 100644
--- a/src/WebAssembly/Structure/Types/FuncType.php
+++ b/src/WebAssembly/Structure/Types/FuncType.php
@@ -18,7 +18,7 @@ final readonly class FuncType
) {
}
- public function equals(FuncType $other): bool
+ public function equals(self $other): bool
{
if (count($this->params) !== count($other->params)) {
return false;
diff --git a/src/WebAssembly/Structure/Types/Limits.php b/src/WebAssembly/Structure/Types/Limits.php
index e60b842..74a3409 100644
--- a/src/WebAssembly/Structure/Types/Limits.php
+++ b/src/WebAssembly/Structure/Types/Limits.php
@@ -18,7 +18,7 @@ final readonly class Limits
public function isValid(): bool
{
- return 0 <= $this->min &&
+ return $this->min >= 0 &&
($this->max === null || $this->min <= $this->max);
}
}