diff options
Diffstat (limited to 'src/WebAssembly/Structure/Instructions/Instrs/Variable')
5 files changed, 100 insertions, 0 deletions
diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalGet.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalGet.php new file mode 100644 index 0000000..2358325 --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalGet.php @@ -0,0 +1,20 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instrs\Variable; + +use Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instr; + +final readonly class GlobalGet extends Instr +{ + protected function __construct( + public int $var, + ) { + } + + public static function opName(): string + { + return "global.get"; + } +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalSet.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalSet.php new file mode 100644 index 0000000..a8d2cf4 --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/GlobalSet.php @@ -0,0 +1,20 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instrs\Variable; + +use Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instr; + +final readonly class GlobalSet extends Instr +{ + protected function __construct( + public int $var, + ) { + } + + public static function opName(): string + { + return "global.set"; + } +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalGet.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalGet.php new file mode 100644 index 0000000..de610d3 --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalGet.php @@ -0,0 +1,20 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instrs\Variable; + +use Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instr; + +final readonly class LocalGet extends Instr +{ + protected function __construct( + public int $var, + ) { + } + + public static function opName(): string + { + return "local.get"; + } +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalSet.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalSet.php new file mode 100644 index 0000000..350c6bd --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalSet.php @@ -0,0 +1,20 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instrs\Variable; + +use Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instr; + +final readonly class LocalSet extends Instr +{ + protected function __construct( + public int $var, + ) { + } + + public static function opName(): string + { + return "local.set"; + } +} diff --git a/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalTee.php b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalTee.php new file mode 100644 index 0000000..62d42c5 --- /dev/null +++ b/src/WebAssembly/Structure/Instructions/Instrs/Variable/LocalTee.php @@ -0,0 +1,20 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instrs\Variable; + +use Nsfisis\Waddiwasi\WebAssembly\Structure\Instructions\Instr; + +final readonly class LocalTee extends Instr +{ + protected function __construct( + public int $var, + ) { + } + + public static function opName(): string + { + return "local.tee"; + } +} |
