From 26f49b7e27076e689541b9e13a1b54f60a4ee5c2 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 11 Jul 2024 02:57:23 +0900 Subject: feat: organize namespaces --- src/WebAssembly/Structure/Instructions/Instr.php | 971 +++++++++++++++++++++ .../Instructions/Instrs/Control/Block.php | 24 + .../Instructions/Instrs/Control/BlockType.php | 25 + .../Instrs/Control/BlockTypes/TypeIdx.php | 14 + .../Instrs/Control/BlockTypes/ValType.php | 20 + .../Structure/Instructions/Instrs/Control/Br.php | 20 + .../Structure/Instructions/Instrs/Control/BrIf.php | 20 + .../Instructions/Instrs/Control/BrTable.php | 24 + .../Structure/Instructions/Instrs/Control/Call.php | 20 + .../Instructions/Instrs/Control/CallIndirect.php | 21 + .../Instructions/Instrs/Control/Else_.php | 15 + .../Structure/Instructions/Instrs/Control/End.php | 15 + .../Structure/Instructions/Instrs/Control/If_.php | 26 + .../Structure/Instructions/Instrs/Control/Loop.php | 24 + .../Structure/Instructions/Instrs/Control/Nop.php | 15 + .../Instructions/Instrs/Control/Return_.php | 15 + .../Instructions/Instrs/Control/Unreachable.php | 15 + .../Instructions/Instrs/Memory/DataDrop.php | 20 + .../Instructions/Instrs/Memory/F32Load.php | 25 + .../Instructions/Instrs/Memory/F32Store.php | 25 + .../Instructions/Instrs/Memory/F64Load.php | 25 + .../Instructions/Instrs/Memory/F64Store.php | 25 + .../Instructions/Instrs/Memory/I32Load.php | 25 + .../Instructions/Instrs/Memory/I32Load16S.php | 25 + .../Instructions/Instrs/Memory/I32Load16U.php | 25 + .../Instructions/Instrs/Memory/I32Load8S.php | 25 + .../Instructions/Instrs/Memory/I32Load8U.php | 25 + .../Instructions/Instrs/Memory/I32Store.php | 25 + .../Instructions/Instrs/Memory/I32Store16.php | 25 + .../Instructions/Instrs/Memory/I32Store8.php | 25 + .../Instructions/Instrs/Memory/I64Load.php | 25 + .../Instructions/Instrs/Memory/I64Load16S.php | 25 + .../Instructions/Instrs/Memory/I64Load16U.php | 25 + .../Instructions/Instrs/Memory/I64Load32S.php | 25 + .../Instructions/Instrs/Memory/I64Load32U.php | 25 + .../Instructions/Instrs/Memory/I64Load8S.php | 25 + .../Instructions/Instrs/Memory/I64Load8U.php | 25 + .../Instructions/Instrs/Memory/I64Store.php | 25 + .../Instructions/Instrs/Memory/I64Store16.php | 25 + .../Instructions/Instrs/Memory/I64Store32.php | 25 + .../Instructions/Instrs/Memory/I64Store8.php | 25 + .../Instructions/Instrs/Memory/MemoryCopy.php | 15 + .../Instructions/Instrs/Memory/MemoryFill.php | 15 + .../Instructions/Instrs/Memory/MemoryGrow.php | 15 + .../Instructions/Instrs/Memory/MemoryInit.php | 20 + .../Instructions/Instrs/Memory/MemorySize.php | 15 + .../Instructions/Instrs/Numeric/F32Abs.php | 15 + .../Instructions/Instrs/Numeric/F32Add.php | 15 + .../Instructions/Instrs/Numeric/F32Ceil.php | 15 + .../Instructions/Instrs/Numeric/F32Const.php | 23 + .../Instructions/Instrs/Numeric/F32ConvertI32S.php | 15 + .../Instructions/Instrs/Numeric/F32ConvertI32U.php | 15 + .../Instructions/Instrs/Numeric/F32ConvertI64S.php | 15 + .../Instructions/Instrs/Numeric/F32ConvertI64U.php | 15 + .../Instructions/Instrs/Numeric/F32CopySign.php | 15 + .../Instructions/Instrs/Numeric/F32DemoteF64.php | 15 + .../Instructions/Instrs/Numeric/F32Div.php | 15 + .../Instructions/Instrs/Numeric/F32Eq.php | 15 + .../Instructions/Instrs/Numeric/F32Floor.php | 15 + .../Instructions/Instrs/Numeric/F32Ge.php | 15 + .../Instructions/Instrs/Numeric/F32Gt.php | 15 + .../Instructions/Instrs/Numeric/F32Le.php | 15 + .../Instructions/Instrs/Numeric/F32Lt.php | 15 + .../Instructions/Instrs/Numeric/F32Max.php | 15 + .../Instructions/Instrs/Numeric/F32Min.php | 15 + .../Instructions/Instrs/Numeric/F32Mul.php | 15 + .../Instructions/Instrs/Numeric/F32Ne.php | 15 + .../Instructions/Instrs/Numeric/F32Nearest.php | 15 + .../Instructions/Instrs/Numeric/F32Neg.php | 15 + .../Instrs/Numeric/F32ReinterpretI32.php | 15 + .../Instrs/Numeric/F32ReinterpretI64.php | 15 + .../Instructions/Instrs/Numeric/F32Sqrt.php | 15 + .../Instructions/Instrs/Numeric/F32Sub.php | 15 + .../Instructions/Instrs/Numeric/F32Trunc.php | 15 + .../Instructions/Instrs/Numeric/F64Abs.php | 15 + .../Instructions/Instrs/Numeric/F64Add.php | 15 + .../Instructions/Instrs/Numeric/F64Ceil.php | 15 + .../Instructions/Instrs/Numeric/F64Const.php | 23 + .../Instructions/Instrs/Numeric/F64ConvertI32S.php | 15 + .../Instructions/Instrs/Numeric/F64ConvertI32U.php | 15 + .../Instructions/Instrs/Numeric/F64ConvertI64S.php | 15 + .../Instructions/Instrs/Numeric/F64ConvertI64U.php | 15 + .../Instructions/Instrs/Numeric/F64CopySign.php | 15 + .../Instructions/Instrs/Numeric/F64Div.php | 15 + .../Instructions/Instrs/Numeric/F64Eq.php | 15 + .../Instructions/Instrs/Numeric/F64Floor.php | 15 + .../Instructions/Instrs/Numeric/F64Ge.php | 15 + .../Instructions/Instrs/Numeric/F64Gt.php | 15 + .../Instructions/Instrs/Numeric/F64Le.php | 15 + .../Instructions/Instrs/Numeric/F64Lt.php | 15 + .../Instructions/Instrs/Numeric/F64Max.php | 15 + .../Instructions/Instrs/Numeric/F64Min.php | 15 + .../Instructions/Instrs/Numeric/F64Mul.php | 15 + .../Instructions/Instrs/Numeric/F64Ne.php | 15 + .../Instructions/Instrs/Numeric/F64Nearest.php | 15 + .../Instructions/Instrs/Numeric/F64Neg.php | 15 + .../Instructions/Instrs/Numeric/F64PromoteF32.php | 15 + .../Instrs/Numeric/F64ReinterpretI32.php | 15 + .../Instrs/Numeric/F64ReinterpretI64.php | 15 + .../Instructions/Instrs/Numeric/F64Sqrt.php | 15 + .../Instructions/Instrs/Numeric/F64Sub.php | 15 + .../Instructions/Instrs/Numeric/F64Trunc.php | 15 + .../Instructions/Instrs/Numeric/I32Add.php | 15 + .../Instructions/Instrs/Numeric/I32And.php | 15 + .../Instructions/Instrs/Numeric/I32Clz.php | 15 + .../Instructions/Instrs/Numeric/I32Const.php | 23 + .../Instructions/Instrs/Numeric/I32Ctz.php | 15 + .../Instructions/Instrs/Numeric/I32DivS.php | 15 + .../Instructions/Instrs/Numeric/I32DivU.php | 15 + .../Instructions/Instrs/Numeric/I32Eq.php | 15 + .../Instructions/Instrs/Numeric/I32Eqz.php | 15 + .../Instructions/Instrs/Numeric/I32Extend16S.php | 15 + .../Instructions/Instrs/Numeric/I32Extend8S.php | 15 + .../Instructions/Instrs/Numeric/I32GeS.php | 15 + .../Instructions/Instrs/Numeric/I32GeU.php | 15 + .../Instructions/Instrs/Numeric/I32GtS.php | 15 + .../Instructions/Instrs/Numeric/I32GtU.php | 15 + .../Instructions/Instrs/Numeric/I32LeS.php | 15 + .../Instructions/Instrs/Numeric/I32LeU.php | 15 + .../Instructions/Instrs/Numeric/I32LtS.php | 15 + .../Instructions/Instrs/Numeric/I32LtU.php | 15 + .../Instructions/Instrs/Numeric/I32Mul.php | 15 + .../Instructions/Instrs/Numeric/I32Ne.php | 15 + .../Instructions/Instrs/Numeric/I32Or.php | 15 + .../Instructions/Instrs/Numeric/I32Popcnt.php | 15 + .../Instrs/Numeric/I32ReinterpretF32.php | 15 + .../Instrs/Numeric/I32ReinterpretF64.php | 15 + .../Instructions/Instrs/Numeric/I32RemS.php | 15 + .../Instructions/Instrs/Numeric/I32RemU.php | 15 + .../Instructions/Instrs/Numeric/I32RotL.php | 15 + .../Instructions/Instrs/Numeric/I32RotR.php | 15 + .../Instructions/Instrs/Numeric/I32Shl.php | 15 + .../Instructions/Instrs/Numeric/I32ShrS.php | 15 + .../Instructions/Instrs/Numeric/I32ShrU.php | 15 + .../Instructions/Instrs/Numeric/I32Sub.php | 15 + .../Instructions/Instrs/Numeric/I32TruncF32S.php | 15 + .../Instructions/Instrs/Numeric/I32TruncF32U.php | 15 + .../Instructions/Instrs/Numeric/I32TruncF64S.php | 15 + .../Instructions/Instrs/Numeric/I32TruncF64U.php | 15 + .../Instrs/Numeric/I32TruncSatF32S.php | 15 + .../Instrs/Numeric/I32TruncSatF32U.php | 15 + .../Instrs/Numeric/I32TruncSatF64S.php | 15 + .../Instrs/Numeric/I32TruncSatF64U.php | 15 + .../Instructions/Instrs/Numeric/I32WrapI64.php | 15 + .../Instructions/Instrs/Numeric/I32Xor.php | 15 + .../Instructions/Instrs/Numeric/I64Add.php | 15 + .../Instructions/Instrs/Numeric/I64And.php | 15 + .../Instructions/Instrs/Numeric/I64Clz.php | 15 + .../Instructions/Instrs/Numeric/I64Const.php | 23 + .../Instructions/Instrs/Numeric/I64Ctz.php | 15 + .../Instructions/Instrs/Numeric/I64DivS.php | 15 + .../Instructions/Instrs/Numeric/I64DivU.php | 15 + .../Instructions/Instrs/Numeric/I64Eq.php | 15 + .../Instructions/Instrs/Numeric/I64Eqz.php | 15 + .../Instructions/Instrs/Numeric/I64Extend16S.php | 15 + .../Instructions/Instrs/Numeric/I64Extend32S.php | 15 + .../Instructions/Instrs/Numeric/I64Extend8S.php | 15 + .../Instructions/Instrs/Numeric/I64ExtendI32S.php | 15 + .../Instructions/Instrs/Numeric/I64ExtendI32U.php | 15 + .../Instructions/Instrs/Numeric/I64GeS.php | 15 + .../Instructions/Instrs/Numeric/I64GeU.php | 15 + .../Instructions/Instrs/Numeric/I64GtS.php | 15 + .../Instructions/Instrs/Numeric/I64GtU.php | 15 + .../Instructions/Instrs/Numeric/I64LeS.php | 15 + .../Instructions/Instrs/Numeric/I64LeU.php | 15 + .../Instructions/Instrs/Numeric/I64LtS.php | 15 + .../Instructions/Instrs/Numeric/I64LtU.php | 15 + .../Instructions/Instrs/Numeric/I64Mul.php | 15 + .../Instructions/Instrs/Numeric/I64Ne.php | 15 + .../Instructions/Instrs/Numeric/I64Or.php | 15 + .../Instructions/Instrs/Numeric/I64Popcnt.php | 15 + .../Instrs/Numeric/I64ReinterpretF32.php | 15 + .../Instrs/Numeric/I64ReinterpretF64.php | 15 + .../Instructions/Instrs/Numeric/I64RemS.php | 15 + .../Instructions/Instrs/Numeric/I64RemU.php | 15 + .../Instructions/Instrs/Numeric/I64RotL.php | 15 + .../Instructions/Instrs/Numeric/I64RotR.php | 15 + .../Instructions/Instrs/Numeric/I64Shl.php | 15 + .../Instructions/Instrs/Numeric/I64ShrS.php | 15 + .../Instructions/Instrs/Numeric/I64ShrU.php | 15 + .../Instructions/Instrs/Numeric/I64Sub.php | 15 + .../Instructions/Instrs/Numeric/I64TruncF32S.php | 15 + .../Instructions/Instrs/Numeric/I64TruncF32U.php | 15 + .../Instructions/Instrs/Numeric/I64TruncF64S.php | 15 + .../Instructions/Instrs/Numeric/I64TruncF64U.php | 15 + .../Instrs/Numeric/I64TruncSatF32S.php | 15 + .../Instrs/Numeric/I64TruncSatF32U.php | 15 + .../Instrs/Numeric/I64TruncSatF64S.php | 15 + .../Instrs/Numeric/I64TruncSatF64U.php | 15 + .../Instructions/Instrs/Numeric/I64Xor.php | 15 + .../Instructions/Instrs/Parametric/Drop.php | 15 + .../Instructions/Instrs/Parametric/Select.php | 24 + .../Instructions/Instrs/Reference/RefFunc.php | 20 + .../Instructions/Instrs/Reference/RefIsNull.php | 15 + .../Instructions/Instrs/Reference/RefNull.php | 21 + .../Instructions/Instrs/Table/ElemDrop.php | 20 + .../Instructions/Instrs/Table/TableCopy.php | 21 + .../Instructions/Instrs/Table/TableFill.php | 20 + .../Instructions/Instrs/Table/TableGet.php | 20 + .../Instructions/Instrs/Table/TableGrow.php | 20 + .../Instructions/Instrs/Table/TableInit.php | 21 + .../Instructions/Instrs/Table/TableSet.php | 20 + .../Instructions/Instrs/Table/TableSize.php | 20 + .../Instructions/Instrs/Variable/GlobalGet.php | 20 + .../Instructions/Instrs/Variable/GlobalSet.php | 20 + .../Instructions/Instrs/Variable/LocalGet.php | 20 + .../Instructions/Instrs/Variable/LocalSet.php | 20 + .../Instructions/Instrs/Variable/LocalTee.php | 20 + 208 files changed, 4508 insertions(+) create mode 100644 src/WebAssembly/Structure/Instructions/Instr.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/BlockType.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/Br.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/BrIf.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/BrTable.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/Call.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/CallIndirect.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/Else_.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/End.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/If_.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/Loop.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/Nop.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/Return_.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Control/Unreachable.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/DataDrop.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Load.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/F32Store.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Load.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/F64Store.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load16U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Load8U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store16.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I32Store8.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load16U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load32U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Load8U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store16.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store32.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/I64Store8.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryCopy.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryFill.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryGrow.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/MemoryInit.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Memory/MemorySize.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Abs.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Add.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ceil.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Const.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI32U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ConvertI64U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32CopySign.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32DemoteF64.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Div.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Eq.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Floor.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ge.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Gt.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Le.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Lt.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Max.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Min.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Mul.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Ne.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Nearest.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Neg.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI32.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32ReinterpretI64.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sqrt.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Sub.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F32Trunc.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Abs.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Add.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ceil.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Const.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI32U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ConvertI64U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64CopySign.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Div.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Eq.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Floor.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ge.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Gt.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Le.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Lt.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Max.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Min.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Mul.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Ne.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Nearest.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Neg.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64PromoteF32.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI32.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64ReinterpretI64.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sqrt.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Sub.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/F64Trunc.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Add.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32And.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Clz.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Const.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ctz.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32DivU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eq.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Eqz.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend16S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Extend8S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GeU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32GtU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LeU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32LtU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Mul.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Ne.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Or.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Popcnt.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF32.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ReinterpretF64.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RemU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotL.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32RotR.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Shl.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32ShrU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Sub.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF32U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncF64U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF32U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32TruncSatF64U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32WrapI64.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I32Xor.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Add.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64And.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Clz.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Const.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ctz.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64DivU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eq.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Eqz.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend16S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend32S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Extend8S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ExtendI32U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GeU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64GtU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LeU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64LtU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Mul.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Ne.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Or.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Popcnt.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF32.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ReinterpretF64.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RemU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotL.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64RotR.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Shl.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrS.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64ShrU.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Sub.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF32U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncF64U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF32U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64S.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64TruncSatF64U.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Numeric/I64Xor.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Parametric/Drop.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Parametric/Select.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Reference/RefFunc.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Reference/RefIsNull.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Reference/RefNull.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Table/ElemDrop.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Table/TableCopy.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Table/TableFill.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Table/TableGet.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Table/TableGrow.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Table/TableInit.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Table/TableSet.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Table/TableSize.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalGet.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalSet.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalGet.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalSet.php create mode 100644 src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalTee.php (limited to 'src/WebAssembly/Structure/Instructions') diff --git a/src/WebAssembly/Structure/Instructions/Instr.php b/src/WebAssembly/Structure/Instructions/Instr.php new file mode 100644 index 0000000..18531c6 --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instr.php @@ -0,0 +1,971 @@ + $types + */ + final public static function Select(array $types): Parametric\Select + { + return new Parametric\Select($types); + } + + // Variable instructions + final public static function GlobalGet(int $var): Variable\GlobalGet + { + 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); + } + + // Table instructions + final public static function ElemDrop(int $elem): Table\ElemDrop + { + 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); + } + + // Memory instructions + final public static function DataDrop(int $data): Memory\DataDrop + { + return new Memory\DataDrop($data); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function F32Load(int $offset, int $align): Memory\F32Load + { + return new Memory\F32Load($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function F32Store(int $offset, int $align): Memory\F32Store + { + return new Memory\F32Store($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function F64Load(int $offset, int $align): Memory\F64Load + { + return new Memory\F64Load($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function F64Store(int $offset, int $align): Memory\F64Store + { + return new Memory\F64Store($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I32Load(int $offset, int $align): Memory\I32Load + { + return new Memory\I32Load($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I32Load16S(int $offset, int $align): Memory\I32Load16S + { + return new Memory\I32Load16S($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I32Load16U(int $offset, int $align): Memory\I32Load16U + { + return new Memory\I32Load16U($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I32Load8S(int $offset, int $align): Memory\I32Load8S + { + return new Memory\I32Load8S($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I32Load8U(int $offset, int $align): Memory\I32Load8U + { + return new Memory\I32Load8U($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I32Store(int $offset, int $align): Memory\I32Store + { + return new Memory\I32Store($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I32Store16(int $offset, int $align): Memory\I32Store16 + { + return new Memory\I32Store16($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I32Store8(int $offset, int $align): Memory\I32Store8 + { + return new Memory\I32Store8($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Load(int $offset, int $align): Memory\I64Load + { + return new Memory\I64Load($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Load16S(int $offset, int $align): Memory\I64Load16S + { + return new Memory\I64Load16S($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Load16U(int $offset, int $align): Memory\I64Load16U + { + return new Memory\I64Load16U($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Load32S(int $offset, int $align): Memory\I64Load32S + { + return new Memory\I64Load32S($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Load32U(int $offset, int $align): Memory\I64Load32U + { + return new Memory\I64Load32U($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Load8S(int $offset, int $align): Memory\I64Load8S + { + return new Memory\I64Load8S($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Load8U(int $offset, int $align): Memory\I64Load8U + { + return new Memory\I64Load8U($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Store(int $offset, int $align): Memory\I64Store + { + return new Memory\I64Store($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Store16(int $offset, int $align): Memory\I64Store16 + { + return new Memory\I64Store16($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Store32(int $offset, int $align): Memory\I64Store32 + { + return new Memory\I64Store32($offset, $align); + } + /** + * @param U32 $offset + * @param U32 $align + */ + final public static function I64Store8(int $offset, int $align): Memory\I64Store8 + { + 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(); + } + + // Control instructions + /** + * @param list $body + */ + final public static function Block(BlockType $type, array $body): Control\Block + { + 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 $labelTable + */ + final public static function BrTable(array $labelTable, int $defaultLabel): Control\BrTable + { + 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 $thenBody + * @param list $elseBody + */ + final public static function If_(BlockType $type, array $thenBody, array $elseBody): Control\If_ + { + return new Control\If_($type, $thenBody, $elseBody); + } + /** + * @param list $body + */ + final public static function Loop(BlockType $type, array $body): Control\Loop + { + 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(); + } + + abstract public static function opName(): string; +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php new file mode 100644 index 0000000..af2c97f --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Block.php @@ -0,0 +1,24 @@ + $body + */ + protected function __construct( + public BlockType $type, + public array $body, + ) { + } + + public static function opName(): string + { + return "block"; + } +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockType.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockType.php new file mode 100644 index 0000000..1188625 --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/BlockType.php @@ -0,0 +1,25 @@ + $labelTable + */ + protected function __construct( + public array $labelTable, + public int $defaultLabel, + ) { + } + + public static function opName(): string + { + return "br_table"; + } +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Call.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Call.php new file mode 100644 index 0000000..461f561 --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Call.php @@ -0,0 +1,20 @@ + $thenBody + * @param list $elseBody + */ + protected function __construct( + public BlockType $type, + public array $thenBody, + public array $elseBody, + ) { + } + + public static function opName(): string + { + return "if"; + } +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Loop.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Loop.php new file mode 100644 index 0000000..ca48ca1 --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Loop.php @@ -0,0 +1,24 @@ + $body + */ + protected function __construct( + public BlockType $type, + public array $body, + ) { + } + + public static function opName(): string + { + return "loop"; + } +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Control/Nop.php b/src/WebAssembly/Structure/Instructions/Instrs/Control/Nop.php new file mode 100644 index 0000000..50a3773 --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Control/Nop.php @@ -0,0 +1,15 @@ + $types + */ + protected function __construct( + public array $types, + ) { + } + + public static function opName(): string + { + return "select"; + } +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefFunc.php b/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefFunc.php new file mode 100644 index 0000000..3539ede --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Reference/RefFunc.php @@ -0,0 +1,20 @@ +