diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-01-03 01:35:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-01-27 12:05:23 +0900 |
| commit | e2495878b872b341e6e04eed31dd255b1a6e256f (patch) | |
| tree | 4057ab19765ea7fc13505798c6434dceac02f4b1 /src/Structure/Instructions/Instrs/Table | |
| parent | 5b4652d080c7eae26f8aac482468a6777ad9defe (diff) | |
| download | php-waddiwasi-e2495878b872b341e6e04eed31dd255b1a6e256f.tar.gz php-waddiwasi-e2495878b872b341e6e04eed31dd255b1a6e256f.tar.zst php-waddiwasi-e2495878b872b341e6e04eed31dd255b1a6e256f.zip | |
feat: implement binary decoder
Diffstat (limited to 'src/Structure/Instructions/Instrs/Table')
8 files changed, 131 insertions, 0 deletions
diff --git a/src/Structure/Instructions/Instrs/Table/ElemDrop.php b/src/Structure/Instructions/Instrs/Table/ElemDrop.php new file mode 100644 index 0000000..fcaf9ea --- /dev/null +++ b/src/Structure/Instructions/Instrs/Table/ElemDrop.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Table; + +use Nsfisis\Waddiwasi\Structure\Instructions\Instr; +use Nsfisis\Waddiwasi\Structure\Types\ElemIdx; + +final readonly class ElemDrop extends Instr +{ + public function __construct( + public ElemIdx $elem, + ) { + } +} diff --git a/src/Structure/Instructions/Instrs/Table/TableCopy.php b/src/Structure/Instructions/Instrs/Table/TableCopy.php new file mode 100644 index 0000000..04a50c8 --- /dev/null +++ b/src/Structure/Instructions/Instrs/Table/TableCopy.php @@ -0,0 +1,17 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Table; + +use Nsfisis\Waddiwasi\Structure\Instructions\Instr; +use Nsfisis\Waddiwasi\Structure\Types\TableIdx; + +final readonly class TableCopy extends Instr +{ + public function __construct( + public TableIdx $to, + public TableIdx $from, + ) { + } +} diff --git a/src/Structure/Instructions/Instrs/Table/TableFill.php b/src/Structure/Instructions/Instrs/Table/TableFill.php new file mode 100644 index 0000000..4128657 --- /dev/null +++ b/src/Structure/Instructions/Instrs/Table/TableFill.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Table; + +use Nsfisis\Waddiwasi\Structure\Instructions\Instr; +use Nsfisis\Waddiwasi\Structure\Types\TableIdx; + +final readonly class TableFill extends Instr +{ + public function __construct( + public TableIdx $table, + ) { + } +} diff --git a/src/Structure/Instructions/Instrs/Table/TableGet.php b/src/Structure/Instructions/Instrs/Table/TableGet.php new file mode 100644 index 0000000..bc1b35f --- /dev/null +++ b/src/Structure/Instructions/Instrs/Table/TableGet.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Table; + +use Nsfisis\Waddiwasi\Structure\Instructions\Instr; +use Nsfisis\Waddiwasi\Structure\Types\TableIdx; + +final readonly class TableGet extends Instr +{ + public function __construct( + public TableIdx $table, + ) { + } +} diff --git a/src/Structure/Instructions/Instrs/Table/TableGrow.php b/src/Structure/Instructions/Instrs/Table/TableGrow.php new file mode 100644 index 0000000..ddd9b2a --- /dev/null +++ b/src/Structure/Instructions/Instrs/Table/TableGrow.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Table; + +use Nsfisis\Waddiwasi\Structure\Instructions\Instr; +use Nsfisis\Waddiwasi\Structure\Types\TableIdx; + +final readonly class TableGrow extends Instr +{ + public function __construct( + public TableIdx $table, + ) { + } +} diff --git a/src/Structure/Instructions/Instrs/Table/TableInit.php b/src/Structure/Instructions/Instrs/Table/TableInit.php new file mode 100644 index 0000000..d4666ae --- /dev/null +++ b/src/Structure/Instructions/Instrs/Table/TableInit.php @@ -0,0 +1,18 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Table; + +use Nsfisis\Waddiwasi\Structure\Instructions\Instr; +use Nsfisis\Waddiwasi\Structure\Types\ElemIdx; +use Nsfisis\Waddiwasi\Structure\Types\TableIdx; + +final readonly class TableInit extends Instr +{ + public function __construct( + public TableIdx $to, + public ElemIdx $from, + ) { + } +} diff --git a/src/Structure/Instructions/Instrs/Table/TableSet.php b/src/Structure/Instructions/Instrs/Table/TableSet.php new file mode 100644 index 0000000..8aaf11e --- /dev/null +++ b/src/Structure/Instructions/Instrs/Table/TableSet.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Table; + +use Nsfisis\Waddiwasi\Structure\Instructions\Instr; +use Nsfisis\Waddiwasi\Structure\Types\TableIdx; + +final readonly class TableSet extends Instr +{ + public function __construct( + public TableIdx $table, + ) { + } +} diff --git a/src/Structure/Instructions/Instrs/Table/TableSize.php b/src/Structure/Instructions/Instrs/Table/TableSize.php new file mode 100644 index 0000000..00200a6 --- /dev/null +++ b/src/Structure/Instructions/Instrs/Table/TableSize.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Table; + +use Nsfisis\Waddiwasi\Structure\Instructions\Instr; +use Nsfisis\Waddiwasi\Structure\Types\TableIdx; + +final readonly class TableSize extends Instr +{ + public function __construct( + public TableIdx $table, + ) { + } +} |
