aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Structure/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/Structure/Modules')
-rw-r--r--src/Structure/Modules/Data.php17
-rw-r--r--src/Structure/Modules/DataMode.php25
-rw-r--r--src/Structure/Modules/DataModes/Active.php20
-rw-r--r--src/Structure/Modules/DataModes/Passive.php14
-rw-r--r--src/Structure/Modules/Elem.php21
-rw-r--r--src/Structure/Modules/ElemMode.php30
-rw-r--r--src/Structure/Modules/ElemModes/Active.php20
-rw-r--r--src/Structure/Modules/ElemModes/Declarative.php14
-rw-r--r--src/Structure/Modules/ElemModes/Passive.php14
-rw-r--r--src/Structure/Modules/Export.php17
-rw-r--r--src/Structure/Modules/ExportDesc.php28
-rw-r--r--src/Structure/Modules/ExportDescs/Func.php15
-rw-r--r--src/Structure/Modules/ExportDescs/Global_.php15
-rw-r--r--src/Structure/Modules/ExportDescs/Mem.php15
-rw-r--r--src/Structure/Modules/ExportDescs/Table.php15
-rw-r--r--src/Structure/Modules/Func.php21
-rw-r--r--src/Structure/Modules/Global_.php20
-rw-r--r--src/Structure/Modules/Import.php19
-rw-r--r--src/Structure/Modules/ImportDesc.php32
-rw-r--r--src/Structure/Modules/ImportDescs/Func.php15
-rw-r--r--src/Structure/Modules/ImportDescs/Global_.php16
-rw-r--r--src/Structure/Modules/ImportDescs/Mem.php16
-rw-r--r--src/Structure/Modules/ImportDescs/Table.php16
-rw-r--r--src/Structure/Modules/Local.php15
-rw-r--r--src/Structure/Modules/Mem.php15
-rw-r--r--src/Structure/Modules/Module.php35
-rw-r--r--src/Structure/Modules/Start.php13
-rw-r--r--src/Structure/Modules/Table.php15
28 files changed, 0 insertions, 528 deletions
diff --git a/src/Structure/Modules/Data.php b/src/Structure/Modules/Data.php
deleted file mode 100644
index 7d36600..0000000
--- a/src/Structure/Modules/Data.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-final readonly class Data
-{
- /**
- * @param list<Byte> $init
- */
- public function __construct(
- public array $init,
- public DataMode $mode,
- ) {
- }
-}
diff --git a/src/Structure/Modules/DataMode.php b/src/Structure/Modules/DataMode.php
deleted file mode 100644
index e9b5a72..0000000
--- a/src/Structure/Modules/DataMode.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-
-abstract readonly class DataMode
-{
- final public static function Passive(): DataModes\Passive
- {
- return new DataModes\Passive();
- }
-
- /**
- * @param list<Instr> $offset
- */
- final public static function Active(
- int $memory,
- array $offset,
- ): DataModes\Active {
- return new DataModes\Active($memory, $offset);
- }
-}
diff --git a/src/Structure/Modules/DataModes/Active.php b/src/Structure/Modules/DataModes/Active.php
deleted file mode 100644
index de52861..0000000
--- a/src/Structure/Modules/DataModes/Active.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\DataModes;
-
-use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-use Nsfisis\Waddiwasi\Structure\Modules\DataMode;
-
-final readonly class Active extends DataMode
-{
- /**
- * @param list<Instr> $offset
- */
- protected function __construct(
- public int $memory,
- public array $offset,
- ) {
- }
-}
diff --git a/src/Structure/Modules/DataModes/Passive.php b/src/Structure/Modules/DataModes/Passive.php
deleted file mode 100644
index 3686cdc..0000000
--- a/src/Structure/Modules/DataModes/Passive.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\DataModes;
-
-use Nsfisis\Waddiwasi\Structure\Modules\DataMode;
-
-final readonly class Passive extends DataMode
-{
- protected function __construct()
- {
- }
-}
diff --git a/src/Structure/Modules/Elem.php b/src/Structure/Modules/Elem.php
deleted file mode 100644
index 55341f4..0000000
--- a/src/Structure/Modules/Elem.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-use Nsfisis\Waddiwasi\Structure\Types\RefType;
-
-final readonly class Elem
-{
- /**
- * @param list<list<Instr>> $init
- */
- public function __construct(
- public RefType $type,
- public array $init,
- public ElemMode $mode,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ElemMode.php b/src/Structure/Modules/ElemMode.php
deleted file mode 100644
index e3e7693..0000000
--- a/src/Structure/Modules/ElemMode.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-
-abstract readonly class ElemMode
-{
- final public static function Passive(): ElemModes\Passive
- {
- return new ElemModes\Passive();
- }
-
- /**
- * @param list<Instr> $offset
- */
- final public static function Active(
- int $table,
- array $offset,
- ): ElemModes\Active {
- return new ElemModes\Active($table, $offset);
- }
-
- final public static function Declarative(): ElemModes\Declarative
- {
- return new ElemModes\Declarative();
- }
-}
diff --git a/src/Structure/Modules/ElemModes/Active.php b/src/Structure/Modules/ElemModes/Active.php
deleted file mode 100644
index 5487542..0000000
--- a/src/Structure/Modules/ElemModes/Active.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ElemModes;
-
-use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-use Nsfisis\Waddiwasi\Structure\Modules\ElemMode;
-
-final readonly class Active extends ElemMode
-{
- /**
- * @param list<Instr> $offset
- */
- protected function __construct(
- public int $table,
- public array $offset,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ElemModes/Declarative.php b/src/Structure/Modules/ElemModes/Declarative.php
deleted file mode 100644
index 7c68331..0000000
--- a/src/Structure/Modules/ElemModes/Declarative.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ElemModes;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ElemMode;
-
-final readonly class Declarative extends ElemMode
-{
- protected function __construct()
- {
- }
-}
diff --git a/src/Structure/Modules/ElemModes/Passive.php b/src/Structure/Modules/ElemModes/Passive.php
deleted file mode 100644
index 0f999a9..0000000
--- a/src/Structure/Modules/ElemModes/Passive.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ElemModes;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ElemMode;
-
-final readonly class Passive extends ElemMode
-{
- protected function __construct()
- {
- }
-}
diff --git a/src/Structure/Modules/Export.php b/src/Structure/Modules/Export.php
deleted file mode 100644
index dc02a1b..0000000
--- a/src/Structure/Modules/Export.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-final readonly class Export
-{
- /**
- * @param Name $name
- */
- public function __construct(
- public string $name,
- public ExportDesc $desc,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ExportDesc.php b/src/Structure/Modules/ExportDesc.php
deleted file mode 100644
index 06e67ba..0000000
--- a/src/Structure/Modules/ExportDesc.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-abstract readonly class ExportDesc
-{
- final public static function Func(int $func): ExportDescs\Func
- {
- return new ExportDescs\Func($func);
- }
-
- final public static function Table(int $table): ExportDescs\Table
- {
- return new ExportDescs\Table($table);
- }
-
- final public static function Mem(int $mem): ExportDescs\Mem
- {
- return new ExportDescs\Mem($mem);
- }
-
- final public static function Global(int $global): ExportDescs\Global_
- {
- return new ExportDescs\Global_($global);
- }
-}
diff --git a/src/Structure/Modules/ExportDescs/Func.php b/src/Structure/Modules/ExportDescs/Func.php
deleted file mode 100644
index dabd213..0000000
--- a/src/Structure/Modules/ExportDescs/Func.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ExportDescs;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ExportDesc;
-
-final readonly class Func extends ExportDesc
-{
- protected function __construct(
- public int $func,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ExportDescs/Global_.php b/src/Structure/Modules/ExportDescs/Global_.php
deleted file mode 100644
index 6fa15f9..0000000
--- a/src/Structure/Modules/ExportDescs/Global_.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ExportDescs;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ExportDesc;
-
-final readonly class Global_ extends ExportDesc
-{
- protected function __construct(
- public int $global,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ExportDescs/Mem.php b/src/Structure/Modules/ExportDescs/Mem.php
deleted file mode 100644
index 7eeebf2..0000000
--- a/src/Structure/Modules/ExportDescs/Mem.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ExportDescs;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ExportDesc;
-
-final readonly class Mem extends ExportDesc
-{
- protected function __construct(
- public int $mem,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ExportDescs/Table.php b/src/Structure/Modules/ExportDescs/Table.php
deleted file mode 100644
index ff32cc0..0000000
--- a/src/Structure/Modules/ExportDescs/Table.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ExportDescs;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ExportDesc;
-
-final readonly class Table extends ExportDesc
-{
- protected function __construct(
- public int $table,
- ) {
- }
-}
diff --git a/src/Structure/Modules/Func.php b/src/Structure/Modules/Func.php
deleted file mode 100644
index 7c76b5e..0000000
--- a/src/Structure/Modules/Func.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-
-final readonly class Func
-{
- /**
- * @param list<Local> $locals
- * @param list<Instr> $body
- */
- public function __construct(
- public int $type,
- public array $locals,
- public array $body,
- ) {
- }
-}
diff --git a/src/Structure/Modules/Global_.php b/src/Structure/Modules/Global_.php
deleted file mode 100644
index aae1706..0000000
--- a/src/Structure/Modules/Global_.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Instructions\Instr;
-use Nsfisis\Waddiwasi\Structure\Types\GlobalType;
-
-final readonly class Global_
-{
- /**
- * @param list<Instr> $init
- */
- public function __construct(
- public GlobalType $type,
- public array $init,
- ) {
- }
-}
diff --git a/src/Structure/Modules/Import.php b/src/Structure/Modules/Import.php
deleted file mode 100644
index 4609a3f..0000000
--- a/src/Structure/Modules/Import.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-final readonly class Import
-{
- /**
- * @param Name $module
- * @param Name $name
- */
- public function __construct(
- public string $module,
- public string $name,
- public ImportDesc $desc,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ImportDesc.php b/src/Structure/Modules/ImportDesc.php
deleted file mode 100644
index 77bd928..0000000
--- a/src/Structure/Modules/ImportDesc.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Types\GlobalType;
-use Nsfisis\Waddiwasi\Structure\Types\MemType;
-use Nsfisis\Waddiwasi\Structure\Types\TableType;
-
-abstract readonly class ImportDesc
-{
- final public static function Func(int $func): ImportDescs\Func
- {
- return new ImportDescs\Func($func);
- }
-
- final public static function Table(TableType $table): ImportDescs\Table
- {
- return new ImportDescs\Table($table);
- }
-
- final public static function Mem(MemType $mem): ImportDescs\Mem
- {
- return new ImportDescs\Mem($mem);
- }
-
- final public static function Global(GlobalType $global): ImportDescs\Global_
- {
- return new ImportDescs\Global_($global);
- }
-}
diff --git a/src/Structure/Modules/ImportDescs/Func.php b/src/Structure/Modules/ImportDescs/Func.php
deleted file mode 100644
index 2bf373e..0000000
--- a/src/Structure/Modules/ImportDescs/Func.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ImportDescs;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ImportDesc;
-
-final readonly class Func extends ImportDesc
-{
- protected function __construct(
- public int $func,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ImportDescs/Global_.php b/src/Structure/Modules/ImportDescs/Global_.php
deleted file mode 100644
index 0015583..0000000
--- a/src/Structure/Modules/ImportDescs/Global_.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ImportDescs;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ImportDesc;
-use Nsfisis\Waddiwasi\Structure\Types\GlobalType;
-
-final readonly class Global_ extends ImportDesc
-{
- protected function __construct(
- public GlobalType $global,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ImportDescs/Mem.php b/src/Structure/Modules/ImportDescs/Mem.php
deleted file mode 100644
index d6d6639..0000000
--- a/src/Structure/Modules/ImportDescs/Mem.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ImportDescs;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ImportDesc;
-use Nsfisis\Waddiwasi\Structure\Types\MemType;
-
-final readonly class Mem extends ImportDesc
-{
- protected function __construct(
- public MemType $mem,
- ) {
- }
-}
diff --git a/src/Structure/Modules/ImportDescs/Table.php b/src/Structure/Modules/ImportDescs/Table.php
deleted file mode 100644
index 166f6a7..0000000
--- a/src/Structure/Modules/ImportDescs/Table.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules\ImportDescs;
-
-use Nsfisis\Waddiwasi\Structure\Modules\ImportDesc;
-use Nsfisis\Waddiwasi\Structure\Types\TableType;
-
-final readonly class Table extends ImportDesc
-{
- protected function __construct(
- public TableType $table,
- ) {
- }
-}
diff --git a/src/Structure/Modules/Local.php b/src/Structure/Modules/Local.php
deleted file mode 100644
index 5c3e224..0000000
--- a/src/Structure/Modules/Local.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Types\ValType;
-
-final readonly class Local
-{
- public function __construct(
- public ValType $type,
- ) {
- }
-}
diff --git a/src/Structure/Modules/Mem.php b/src/Structure/Modules/Mem.php
deleted file mode 100644
index ab651b0..0000000
--- a/src/Structure/Modules/Mem.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Types\MemType;
-
-final readonly class Mem
-{
- public function __construct(
- public MemType $type,
- ) {
- }
-}
diff --git a/src/Structure/Modules/Module.php b/src/Structure/Modules/Module.php
deleted file mode 100644
index ab978a3..0000000
--- a/src/Structure/Modules/Module.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Types\FuncType;
-
-final readonly class Module
-{
- /**
- * @param list<FuncType> $types
- * @param list<Func> $funcs
- * @param list<Table> $tables
- * @param list<Mem> $mems
- * @param list<Global_> $globals
- * @param list<Elem> $elems
- * @param list<Data> $datas
- * @param list<Import> $imports
- * @param list<Export> $exports
- */
- public function __construct(
- public array $types,
- public array $funcs,
- public array $tables,
- public array $mems,
- public array $globals,
- public array $elems,
- public array $datas,
- public ?Start $start,
- public array $imports,
- public array $exports,
- ) {
- }
-}
diff --git a/src/Structure/Modules/Start.php b/src/Structure/Modules/Start.php
deleted file mode 100644
index 1ef75df..0000000
--- a/src/Structure/Modules/Start.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-final readonly class Start
-{
- public function __construct(
- public int $func,
- ) {
- }
-}
diff --git a/src/Structure/Modules/Table.php b/src/Structure/Modules/Table.php
deleted file mode 100644
index 06ccdb0..0000000
--- a/src/Structure/Modules/Table.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Nsfisis\Waddiwasi\Structure\Modules;
-
-use Nsfisis\Waddiwasi\Structure\Types\TableType;
-
-final readonly class Table
-{
- public function __construct(
- public TableType $type,
- ) {
- }
-}