aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Structure/Instructions/Instrs/Variable
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-03 21:01:46 +0900
committernsfisis <nsfisis@gmail.com>2024-03-04 07:23:59 +0900
commit8b689c5ff077252a68c88bc7d70990405fc8dd5a (patch)
tree216bef1b2bd71892086a2961617bcdb7d22ea2b1 /src/Structure/Instructions/Instrs/Variable
parent996259e6a1a04f91179d2b83cc19e3fbb371cd33 (diff)
downloadphp-waddiwasi-8b689c5ff077252a68c88bc7d70990405fc8dd5a.tar.gz
php-waddiwasi-8b689c5ff077252a68c88bc7d70990405fc8dd5a.tar.zst
php-waddiwasi-8b689c5ff077252a68c88bc7d70990405fc8dd5a.zip
feat: implement more instructions
Diffstat (limited to 'src/Structure/Instructions/Instrs/Variable')
-rw-r--r--src/Structure/Instructions/Instrs/Variable/GlobalGet.php5
-rw-r--r--src/Structure/Instructions/Instrs/Variable/GlobalSet.php5
-rw-r--r--src/Structure/Instructions/Instrs/Variable/LocalGet.php5
-rw-r--r--src/Structure/Instructions/Instrs/Variable/LocalSet.php5
-rw-r--r--src/Structure/Instructions/Instrs/Variable/LocalTee.php5
5 files changed, 25 insertions, 0 deletions
diff --git a/src/Structure/Instructions/Instrs/Variable/GlobalGet.php b/src/Structure/Instructions/Instrs/Variable/GlobalGet.php
index a3bd2c6..542a805 100644
--- a/src/Structure/Instructions/Instrs/Variable/GlobalGet.php
+++ b/src/Structure/Instructions/Instrs/Variable/GlobalGet.php
@@ -13,4 +13,9 @@ final readonly class GlobalGet extends Instr
public GlobalIdx $var,
) {
}
+
+ public static function opName(): string
+ {
+ return "global.get";
+ }
}
diff --git a/src/Structure/Instructions/Instrs/Variable/GlobalSet.php b/src/Structure/Instructions/Instrs/Variable/GlobalSet.php
index 080e15a..1540dd3 100644
--- a/src/Structure/Instructions/Instrs/Variable/GlobalSet.php
+++ b/src/Structure/Instructions/Instrs/Variable/GlobalSet.php
@@ -13,4 +13,9 @@ final readonly class GlobalSet extends Instr
public GlobalIdx $var,
) {
}
+
+ public static function opName(): string
+ {
+ return "global.set";
+ }
}
diff --git a/src/Structure/Instructions/Instrs/Variable/LocalGet.php b/src/Structure/Instructions/Instrs/Variable/LocalGet.php
index bc764c2..4fc0ced 100644
--- a/src/Structure/Instructions/Instrs/Variable/LocalGet.php
+++ b/src/Structure/Instructions/Instrs/Variable/LocalGet.php
@@ -13,4 +13,9 @@ final readonly class LocalGet extends Instr
public LocalIdx $var,
) {
}
+
+ public static function opName(): string
+ {
+ return "local.get";
+ }
}
diff --git a/src/Structure/Instructions/Instrs/Variable/LocalSet.php b/src/Structure/Instructions/Instrs/Variable/LocalSet.php
index 9b107e8..4a21ca3 100644
--- a/src/Structure/Instructions/Instrs/Variable/LocalSet.php
+++ b/src/Structure/Instructions/Instrs/Variable/LocalSet.php
@@ -13,4 +13,9 @@ final readonly class LocalSet extends Instr
public LocalIdx $var,
) {
}
+
+ public static function opName(): string
+ {
+ return "local.set";
+ }
}
diff --git a/src/Structure/Instructions/Instrs/Variable/LocalTee.php b/src/Structure/Instructions/Instrs/Variable/LocalTee.php
index 3e48e8e..97fb46a 100644
--- a/src/Structure/Instructions/Instrs/Variable/LocalTee.php
+++ b/src/Structure/Instructions/Instrs/Variable/LocalTee.php
@@ -13,4 +13,9 @@ final readonly class LocalTee extends Instr
public LocalIdx $var,
) {
}
+
+ public static function opName(): string
+ {
+ return "local.tee";
+ }
}