diff options
Diffstat (limited to 'src/Structure/Instructions/Instrs/Control')
16 files changed, 0 insertions, 313 deletions
diff --git a/src/Structure/Instructions/Instrs/Control/Block.php b/src/Structure/Instructions/Instrs/Control/Block.php deleted file mode 100644 index 29e68fd..0000000 --- a/src/Structure/Instructions/Instrs/Control/Block.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class Block extends Instr -{ - /** - * @param list<Instr> $body - */ - protected function __construct( - public BlockType $type, - public array $body, - ) { - } - - public static function opName(): string - { - return "block"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/BlockType.php b/src/Structure/Instructions/Instrs/Control/BlockType.php deleted file mode 100644 index a90389b..0000000 --- a/src/Structure/Instructions/Instrs/Control/BlockType.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Types\ValType; - -abstract readonly class BlockType -{ - final public static function TypeIdx(int $type): BlockTypes\TypeIdx - { - return new BlockTypes\TypeIdx($type); - } - - final public static function ValType(?ValType $type): BlockTypes\ValType - { - return new BlockTypes\ValType($type); - } - - public static function opName(): string - { - return "hoge"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php b/src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php deleted file mode 100644 index 564eaf4..0000000 --- a/src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control\BlockTypes; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control\BlockType; - -final readonly class TypeIdx extends BlockType -{ - protected function __construct(public int $inner) - { - } -} diff --git a/src/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php b/src/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php deleted file mode 100644 index 8c3880b..0000000 --- a/src/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control\BlockTypes; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control\BlockType; -use Nsfisis\Waddiwasi\Structure\Types\ValType as OrigValType; - -final readonly class ValType extends BlockType -{ - protected function __construct(public ?OrigValType $inner) - { - } - - public static function opName(): string - { - return "hoge"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/Br.php b/src/Structure/Instructions/Instrs/Control/Br.php deleted file mode 100644 index 7fe3415..0000000 --- a/src/Structure/Instructions/Instrs/Control/Br.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class Br extends Instr -{ - protected function __construct( - public int $label, - ) { - } - - public static function opName(): string - { - return "br"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/BrIf.php b/src/Structure/Instructions/Instrs/Control/BrIf.php deleted file mode 100644 index 5fb622e..0000000 --- a/src/Structure/Instructions/Instrs/Control/BrIf.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class BrIf extends Instr -{ - protected function __construct( - public int $label, - ) { - } - - public static function opName(): string - { - return "br_if"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/BrTable.php b/src/Structure/Instructions/Instrs/Control/BrTable.php deleted file mode 100644 index a9c37e8..0000000 --- a/src/Structure/Instructions/Instrs/Control/BrTable.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class BrTable extends Instr -{ - /** - * @param list<int> $labelTable - */ - protected function __construct( - public array $labelTable, - public int $defaultLabel, - ) { - } - - public static function opName(): string - { - return "br_table"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/Call.php b/src/Structure/Instructions/Instrs/Control/Call.php deleted file mode 100644 index 9ee14be..0000000 --- a/src/Structure/Instructions/Instrs/Control/Call.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class Call extends Instr -{ - protected function __construct( - public int $func, - ) { - } - - public static function opName(): string - { - return "call"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/CallIndirect.php b/src/Structure/Instructions/Instrs/Control/CallIndirect.php deleted file mode 100644 index 11617ce..0000000 --- a/src/Structure/Instructions/Instrs/Control/CallIndirect.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class CallIndirect extends Instr -{ - protected function __construct( - public int $funcTable, - public int $type, - ) { - } - - public static function opName(): string - { - return "call_indirect"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/Else_.php b/src/Structure/Instructions/Instrs/Control/Else_.php deleted file mode 100644 index c04d571..0000000 --- a/src/Structure/Instructions/Instrs/Control/Else_.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class Else_ extends Instr -{ - public static function opName(): string - { - return "else"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/End.php b/src/Structure/Instructions/Instrs/Control/End.php deleted file mode 100644 index 14535c0..0000000 --- a/src/Structure/Instructions/Instrs/Control/End.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class End extends Instr -{ - public static function opName(): string - { - return "end"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/If_.php b/src/Structure/Instructions/Instrs/Control/If_.php deleted file mode 100644 index f758395..0000000 --- a/src/Structure/Instructions/Instrs/Control/If_.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class If_ extends Instr -{ - /** - * @param list<Instr> $thenBody - * @param list<Instr> $elseBody - */ - protected function __construct( - public BlockType $type, - public array $thenBody, - public array $elseBody, - ) { - } - - public static function opName(): string - { - return "if"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/Loop.php b/src/Structure/Instructions/Instrs/Control/Loop.php deleted file mode 100644 index 1572e4b..0000000 --- a/src/Structure/Instructions/Instrs/Control/Loop.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class Loop extends Instr -{ - /** - * @param list<Instr> $body - */ - protected function __construct( - public BlockType $type, - public array $body, - ) { - } - - public static function opName(): string - { - return "loop"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/Nop.php b/src/Structure/Instructions/Instrs/Control/Nop.php deleted file mode 100644 index 3aaeb4d..0000000 --- a/src/Structure/Instructions/Instrs/Control/Nop.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class Nop extends Instr -{ - public static function opName(): string - { - return "nop"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/Return_.php b/src/Structure/Instructions/Instrs/Control/Return_.php deleted file mode 100644 index 1391b1a..0000000 --- a/src/Structure/Instructions/Instrs/Control/Return_.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class Return_ extends Instr -{ - public static function opName(): string - { - return "return"; - } -} diff --git a/src/Structure/Instructions/Instrs/Control/Unreachable.php b/src/Structure/Instructions/Instrs/Control/Unreachable.php deleted file mode 100644 index 6993099..0000000 --- a/src/Structure/Instructions/Instrs/Control/Unreachable.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control; - -use Nsfisis\Waddiwasi\Structure\Instructions\Instr; - -final readonly class Unreachable extends Instr -{ - public static function opName(): string - { - return "unreachable"; - } -} |
