From 8b689c5ff077252a68c88bc7d70990405fc8dd5a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 Mar 2024 21:01:46 +0900 Subject: feat: implement more instructions --- src/Structure/Instructions/Instrs/Table/ElemDrop.php | 5 +++++ src/Structure/Instructions/Instrs/Table/TableCopy.php | 5 +++++ src/Structure/Instructions/Instrs/Table/TableFill.php | 5 +++++ src/Structure/Instructions/Instrs/Table/TableGet.php | 5 +++++ src/Structure/Instructions/Instrs/Table/TableGrow.php | 5 +++++ src/Structure/Instructions/Instrs/Table/TableInit.php | 5 +++++ src/Structure/Instructions/Instrs/Table/TableSet.php | 5 +++++ src/Structure/Instructions/Instrs/Table/TableSize.php | 5 +++++ 8 files changed, 40 insertions(+) (limited to 'src/Structure/Instructions/Instrs/Table') diff --git a/src/Structure/Instructions/Instrs/Table/ElemDrop.php b/src/Structure/Instructions/Instrs/Table/ElemDrop.php index 5b96fcd..bbf4586 100644 --- a/src/Structure/Instructions/Instrs/Table/ElemDrop.php +++ b/src/Structure/Instructions/Instrs/Table/ElemDrop.php @@ -13,4 +13,9 @@ final readonly class ElemDrop extends Instr public ElemIdx $elem, ) { } + + public static function opName(): string + { + return "elem.drop"; + } } diff --git a/src/Structure/Instructions/Instrs/Table/TableCopy.php b/src/Structure/Instructions/Instrs/Table/TableCopy.php index 4c5d008..85aa9fc 100644 --- a/src/Structure/Instructions/Instrs/Table/TableCopy.php +++ b/src/Structure/Instructions/Instrs/Table/TableCopy.php @@ -14,4 +14,9 @@ final readonly class TableCopy extends Instr public TableIdx $from, ) { } + + public static function opName(): string + { + return "table.copy"; + } } diff --git a/src/Structure/Instructions/Instrs/Table/TableFill.php b/src/Structure/Instructions/Instrs/Table/TableFill.php index 43d1f57..84c6e13 100644 --- a/src/Structure/Instructions/Instrs/Table/TableFill.php +++ b/src/Structure/Instructions/Instrs/Table/TableFill.php @@ -13,4 +13,9 @@ final readonly class TableFill extends Instr public TableIdx $table, ) { } + + public static function opName(): string + { + return "table.fill"; + } } diff --git a/src/Structure/Instructions/Instrs/Table/TableGet.php b/src/Structure/Instructions/Instrs/Table/TableGet.php index 77ebf4a..e10dd5a 100644 --- a/src/Structure/Instructions/Instrs/Table/TableGet.php +++ b/src/Structure/Instructions/Instrs/Table/TableGet.php @@ -13,4 +13,9 @@ final readonly class TableGet extends Instr public TableIdx $table, ) { } + + public static function opName(): string + { + return "table.get"; + } } diff --git a/src/Structure/Instructions/Instrs/Table/TableGrow.php b/src/Structure/Instructions/Instrs/Table/TableGrow.php index 2ac222d..4f224fc 100644 --- a/src/Structure/Instructions/Instrs/Table/TableGrow.php +++ b/src/Structure/Instructions/Instrs/Table/TableGrow.php @@ -13,4 +13,9 @@ final readonly class TableGrow extends Instr public TableIdx $table, ) { } + + public static function opName(): string + { + return "table.grow"; + } } diff --git a/src/Structure/Instructions/Instrs/Table/TableInit.php b/src/Structure/Instructions/Instrs/Table/TableInit.php index 7617809..2c834c0 100644 --- a/src/Structure/Instructions/Instrs/Table/TableInit.php +++ b/src/Structure/Instructions/Instrs/Table/TableInit.php @@ -15,4 +15,9 @@ final readonly class TableInit extends Instr public ElemIdx $from, ) { } + + public static function opName(): string + { + return "table.init"; + } } diff --git a/src/Structure/Instructions/Instrs/Table/TableSet.php b/src/Structure/Instructions/Instrs/Table/TableSet.php index 7ac7c8e..f02c375 100644 --- a/src/Structure/Instructions/Instrs/Table/TableSet.php +++ b/src/Structure/Instructions/Instrs/Table/TableSet.php @@ -13,4 +13,9 @@ final readonly class TableSet extends Instr public TableIdx $table, ) { } + + public static function opName(): string + { + return "table.set"; + } } diff --git a/src/Structure/Instructions/Instrs/Table/TableSize.php b/src/Structure/Instructions/Instrs/Table/TableSize.php index 1c63e34..321c8f7 100644 --- a/src/Structure/Instructions/Instrs/Table/TableSize.php +++ b/src/Structure/Instructions/Instrs/Table/TableSize.php @@ -13,4 +13,9 @@ final readonly class TableSize extends Instr public TableIdx $table, ) { } + + public static function opName(): string + { + return "table.size"; + } } -- cgit v1.2.3-70-g09d2