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/Block.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/BlockType.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/Br.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/BrIf.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/BrTable.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/Call.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/CallIndirect.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/Else_.php4
-rw-r--r--src/Structure/Instructions/Instrs/Control/End.php4
-rw-r--r--src/Structure/Instructions/Instrs/Control/If_.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/Loop.php5
-rw-r--r--src/Structure/Instructions/Instrs/Control/Nop.php4
-rw-r--r--src/Structure/Instructions/Instrs/Control/Return_.php4
-rw-r--r--src/Structure/Instructions/Instrs/Control/Unreachable.php4
16 files changed, 75 insertions, 0 deletions
diff --git a/src/Structure/Instructions/Instrs/Control/Block.php b/src/Structure/Instructions/Instrs/Control/Block.php
index a4842c0..29e68fd 100644
--- a/src/Structure/Instructions/Instrs/Control/Block.php
+++ b/src/Structure/Instructions/Instrs/Control/Block.php
@@ -16,4 +16,9 @@ final readonly class Block extends Instr
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
index 68c6bd4..c2fe106 100644
--- a/src/Structure/Instructions/Instrs/Control/BlockType.php
+++ b/src/Structure/Instructions/Instrs/Control/BlockType.php
@@ -18,4 +18,9 @@ abstract readonly class BlockType
{
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
index b633bb7..bb798e4 100644
--- a/src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php
+++ b/src/Structure/Instructions/Instrs/Control/BlockTypes/TypeIdx.php
@@ -12,4 +12,9 @@ final readonly class TypeIdx extends BlockType
protected function __construct(public OrigTypeIdx $inner)
{
}
+
+ public static function opName(): string
+ {
+ return "hoge";
+ }
}
diff --git a/src/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php b/src/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php
index 1a56ce4..8c3880b 100644
--- a/src/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php
+++ b/src/Structure/Instructions/Instrs/Control/BlockTypes/ValType.php
@@ -12,4 +12,9 @@ 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
index b8564a0..26af157 100644
--- a/src/Structure/Instructions/Instrs/Control/Br.php
+++ b/src/Structure/Instructions/Instrs/Control/Br.php
@@ -13,4 +13,9 @@ final readonly class Br extends Instr
public LabelIdx $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
index 980c76e..c6a4b3c 100644
--- a/src/Structure/Instructions/Instrs/Control/BrIf.php
+++ b/src/Structure/Instructions/Instrs/Control/BrIf.php
@@ -13,4 +13,9 @@ final readonly class BrIf extends Instr
public LabelIdx $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
index 37f61ed..c7685f6 100644
--- a/src/Structure/Instructions/Instrs/Control/BrTable.php
+++ b/src/Structure/Instructions/Instrs/Control/BrTable.php
@@ -17,4 +17,9 @@ final readonly class BrTable extends Instr
public LabelIdx $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
index 472752b..ba73037 100644
--- a/src/Structure/Instructions/Instrs/Control/Call.php
+++ b/src/Structure/Instructions/Instrs/Control/Call.php
@@ -13,4 +13,9 @@ final readonly class Call extends Instr
public FuncIdx $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
index 6f43e06..d6fcea4 100644
--- a/src/Structure/Instructions/Instrs/Control/CallIndirect.php
+++ b/src/Structure/Instructions/Instrs/Control/CallIndirect.php
@@ -15,4 +15,9 @@ final readonly class CallIndirect extends Instr
public TypeIdx $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
index 665b11f..c04d571 100644
--- a/src/Structure/Instructions/Instrs/Control/Else_.php
+++ b/src/Structure/Instructions/Instrs/Control/Else_.php
@@ -8,4 +8,8 @@ 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
index 275dc6d..14535c0 100644
--- a/src/Structure/Instructions/Instrs/Control/End.php
+++ b/src/Structure/Instructions/Instrs/Control/End.php
@@ -8,4 +8,8 @@ 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
index 1eeee47..f758395 100644
--- a/src/Structure/Instructions/Instrs/Control/If_.php
+++ b/src/Structure/Instructions/Instrs/Control/If_.php
@@ -18,4 +18,9 @@ final readonly class If_ extends Instr
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
index 839f75d..1572e4b 100644
--- a/src/Structure/Instructions/Instrs/Control/Loop.php
+++ b/src/Structure/Instructions/Instrs/Control/Loop.php
@@ -16,4 +16,9 @@ final readonly class Loop extends Instr
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
index dbb1b6c..3aaeb4d 100644
--- a/src/Structure/Instructions/Instrs/Control/Nop.php
+++ b/src/Structure/Instructions/Instrs/Control/Nop.php
@@ -8,4 +8,8 @@ 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
index 0322076..1391b1a 100644
--- a/src/Structure/Instructions/Instrs/Control/Return_.php
+++ b/src/Structure/Instructions/Instrs/Control/Return_.php
@@ -8,4 +8,8 @@ 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
index 49f586b..6993099 100644
--- a/src/Structure/Instructions/Instrs/Control/Unreachable.php
+++ b/src/Structure/Instructions/Instrs/Control/Unreachable.php
@@ -8,4 +8,8 @@ use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
final readonly class Unreachable extends Instr
{
+ public static function opName(): string
+ {
+ return "unreachable";
+ }
}