aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Structure/Instructions/Instrs/Control
diff options
context:
space:
mode:
Diffstat (limited to 'src/Structure/Instructions/Instrs/Control')
-rw-r--r--src/Structure/Instructions/Instrs/Control/BlockType.php3
-rw-r--r--src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php8
-rw-r--r--src/Structure/Instructions/Instrs/Control/Br.php3
-rw-r--r--src/Structure/Instructions/Instrs/Control/BrIf.php3
-rw-r--r--src/Structure/Instructions/Instrs/Control/BrTable.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/Call.php3
-rw-r--r--src/Structure/Instructions/Instrs/Control/CallIndirect.php6
7 files changed, 9 insertions, 22 deletions
diff --git a/src/Structure/Instructions/Instrs/Control/BlockType.php b/src/Structure/Instructions/Instrs/Control/BlockType.php
index c2fe106..a90389b 100644
--- a/src/Structure/Instructions/Instrs/Control/BlockType.php
+++ b/src/Structure/Instructions/Instrs/Control/BlockType.php
@@ -4,12 +4,11 @@ declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control;
-use Nsfisis\Waddiwasi\Structure\Types\TypeIdx;
use Nsfisis\Waddiwasi\Structure\Types\ValType;
abstract readonly class BlockType
{
- final public static function TypeIdx(TypeIdx $type): BlockTypes\TypeIdx
+ final public static function TypeIdx(int $type): BlockTypes\TypeIdx
{
return new BlockTypes\TypeIdx($type);
}
diff --git a/src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php b/src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php
index bb798e4..564eaf4 100644
--- a/src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php
+++ b/src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php
@@ -5,16 +5,10 @@ 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\TypeIdx as OrigTypeIdx;
final readonly class TypeIdx extends BlockType
{
- protected function __construct(public OrigTypeIdx $inner)
+ protected function __construct(public int $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
index 26af157..7fe3415 100644
--- a/src/Structure/Instructions/Instrs/Control/Br.php
+++ b/src/Structure/Instructions/Instrs/Control/Br.php
@@ -5,12 +5,11 @@ declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control;
use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-use Nsfisis\Waddiwasi\Structure\Types\LabelIdx;
final readonly class Br extends Instr
{
protected function __construct(
- public LabelIdx $label,
+ public int $label,
) {
}
diff --git a/src/Structure/Instructions/Instrs/Control/BrIf.php b/src/Structure/Instructions/Instrs/Control/BrIf.php
index c6a4b3c..5fb622e 100644
--- a/src/Structure/Instructions/Instrs/Control/BrIf.php
+++ b/src/Structure/Instructions/Instrs/Control/BrIf.php
@@ -5,12 +5,11 @@ declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control;
use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-use Nsfisis\Waddiwasi\Structure\Types\LabelIdx;
final readonly class BrIf extends Instr
{
protected function __construct(
- public LabelIdx $label,
+ public int $label,
) {
}
diff --git a/src/Structure/Instructions/Instrs/Control/BrTable.php b/src/Structure/Instructions/Instrs/Control/BrTable.php
index c7685f6..a9c37e8 100644
--- a/src/Structure/Instructions/Instrs/Control/BrTable.php
+++ b/src/Structure/Instructions/Instrs/Control/BrTable.php
@@ -5,16 +5,15 @@ declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control;
use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-use Nsfisis\Waddiwasi\Structure\Types\LabelIdx;
final readonly class BrTable extends Instr
{
/**
- * @param list<LabelIdx> $labelTable
+ * @param list<int> $labelTable
*/
protected function __construct(
public array $labelTable,
- public LabelIdx $defaultLabel,
+ public int $defaultLabel,
) {
}
diff --git a/src/Structure/Instructions/Instrs/Control/Call.php b/src/Structure/Instructions/Instrs/Control/Call.php
index ba73037..9ee14be 100644
--- a/src/Structure/Instructions/Instrs/Control/Call.php
+++ b/src/Structure/Instructions/Instrs/Control/Call.php
@@ -5,12 +5,11 @@ declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control;
use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-use Nsfisis\Waddiwasi\Structure\Types\FuncIdx;
final readonly class Call extends Instr
{
protected function __construct(
- public FuncIdx $func,
+ public int $func,
) {
}
diff --git a/src/Structure/Instructions/Instrs/Control/CallIndirect.php b/src/Structure/Instructions/Instrs/Control/CallIndirect.php
index d6fcea4..11617ce 100644
--- a/src/Structure/Instructions/Instrs/Control/CallIndirect.php
+++ b/src/Structure/Instructions/Instrs/Control/CallIndirect.php
@@ -5,14 +5,12 @@ declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Structure\Instructions\Instrs\Control;
use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-use Nsfisis\Waddiwasi\Structure\Types\TableIdx;
-use Nsfisis\Waddiwasi\Structure\Types\TypeIdx;
final readonly class CallIndirect extends Instr
{
protected function __construct(
- public TableIdx $funcTable,
- public TypeIdx $type,
+ public int $funcTable,
+ public int $type,
) {
}