aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Structure/Instructions/Instrs/Control
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-01-27 13:22:56 +0900
committernsfisis <nsfisis@gmail.com>2024-02-26 11:07:06 +0900
commit900377463a8264871ee42e488112b076b7973b6a (patch)
treebf727d3484ca7c8d35f18ef29ea8d9305d4b57da /src/Structure/Instructions/Instrs/Control
parente2495878b872b341e6e04eed31dd255b1a6e256f (diff)
downloadphp-waddiwasi-900377463a8264871ee42e488112b076b7973b6a.tar.gz
php-waddiwasi-900377463a8264871ee42e488112b076b7973b6a.tar.zst
php-waddiwasi-900377463a8264871ee42e488112b076b7973b6a.zip
feat: partially implement execution
Diffstat (limited to 'src/Structure/Instructions/Instrs/Control')
-rw-r--r--src/Structure/Instructions/Instrs/Control/Block.php2
-rw-r--r--src/Structure/Instructions/Instrs/Control/Br.php2
-rw-r--r--src/Structure/Instructions/Instrs/Control/BrIf.php2
-rw-r--r--src/Structure/Instructions/Instrs/Control/BrTable.php2
-rw-r--r--src/Structure/Instructions/Instrs/Control/Call.php2
-rw-r--r--src/Structure/Instructions/Instrs/Control/CallIndirect.php2
-rw-r--r--src/Structure/Instructions/Instrs/Control/If_.php2
-rw-r--r--src/Structure/Instructions/Instrs/Control/Loop.php2
8 files changed, 8 insertions, 8 deletions
diff --git a/src/Structure/Instructions/Instrs/Control/Block.php b/src/Structure/Instructions/Instrs/Control/Block.php
index 2be7a1f..a4842c0 100644
--- a/src/Structure/Instructions/Instrs/Control/Block.php
+++ b/src/Structure/Instructions/Instrs/Control/Block.php
@@ -11,7 +11,7 @@ final readonly class Block extends Instr
/**
* @param list<Instr> $body
*/
- public function __construct(
+ protected function __construct(
public BlockType $type,
public array $body,
) {
diff --git a/src/Structure/Instructions/Instrs/Control/Br.php b/src/Structure/Instructions/Instrs/Control/Br.php
index 836f3f1..b8564a0 100644
--- a/src/Structure/Instructions/Instrs/Control/Br.php
+++ b/src/Structure/Instructions/Instrs/Control/Br.php
@@ -9,7 +9,7 @@ use Nsfisis\Waddiwasi\Structure\Types\LabelIdx;
final readonly class Br extends Instr
{
- public function __construct(
+ protected function __construct(
public LabelIdx $label,
) {
}
diff --git a/src/Structure/Instructions/Instrs/Control/BrIf.php b/src/Structure/Instructions/Instrs/Control/BrIf.php
index a15a716..980c76e 100644
--- a/src/Structure/Instructions/Instrs/Control/BrIf.php
+++ b/src/Structure/Instructions/Instrs/Control/BrIf.php
@@ -9,7 +9,7 @@ use Nsfisis\Waddiwasi\Structure\Types\LabelIdx;
final readonly class BrIf extends Instr
{
- public function __construct(
+ protected function __construct(
public LabelIdx $label,
) {
}
diff --git a/src/Structure/Instructions/Instrs/Control/BrTable.php b/src/Structure/Instructions/Instrs/Control/BrTable.php
index 57a08f3..37f61ed 100644
--- a/src/Structure/Instructions/Instrs/Control/BrTable.php
+++ b/src/Structure/Instructions/Instrs/Control/BrTable.php
@@ -12,7 +12,7 @@ final readonly class BrTable extends Instr
/**
* @param list<LabelIdx> $labelTable
*/
- public function __construct(
+ protected function __construct(
public array $labelTable,
public LabelIdx $defaultLabel,
) {
diff --git a/src/Structure/Instructions/Instrs/Control/Call.php b/src/Structure/Instructions/Instrs/Control/Call.php
index c8702d3..472752b 100644
--- a/src/Structure/Instructions/Instrs/Control/Call.php
+++ b/src/Structure/Instructions/Instrs/Control/Call.php
@@ -9,7 +9,7 @@ use Nsfisis\Waddiwasi\Structure\Types\FuncIdx;
final readonly class Call extends Instr
{
- public function __construct(
+ protected function __construct(
public FuncIdx $func,
) {
}
diff --git a/src/Structure/Instructions/Instrs/Control/CallIndirect.php b/src/Structure/Instructions/Instrs/Control/CallIndirect.php
index 2cf28a5..6f43e06 100644
--- a/src/Structure/Instructions/Instrs/Control/CallIndirect.php
+++ b/src/Structure/Instructions/Instrs/Control/CallIndirect.php
@@ -10,7 +10,7 @@ use Nsfisis\Waddiwasi\Structure\Types\TypeIdx;
final readonly class CallIndirect extends Instr
{
- public function __construct(
+ protected function __construct(
public TableIdx $funcTable,
public TypeIdx $type,
) {
diff --git a/src/Structure/Instructions/Instrs/Control/If_.php b/src/Structure/Instructions/Instrs/Control/If_.php
index 0536be0..1eeee47 100644
--- a/src/Structure/Instructions/Instrs/Control/If_.php
+++ b/src/Structure/Instructions/Instrs/Control/If_.php
@@ -12,7 +12,7 @@ final readonly class If_ extends Instr
* @param list<Instr> $thenBody
* @param list<Instr> $elseBody
*/
- public function __construct(
+ protected function __construct(
public BlockType $type,
public array $thenBody,
public array $elseBody,
diff --git a/src/Structure/Instructions/Instrs/Control/Loop.php b/src/Structure/Instructions/Instrs/Control/Loop.php
index 30c85ef..839f75d 100644
--- a/src/Structure/Instructions/Instrs/Control/Loop.php
+++ b/src/Structure/Instructions/Instrs/Control/Loop.php
@@ -11,7 +11,7 @@ final readonly class Loop extends Instr
/**
* @param list<Instr> $body
*/
- public function __construct(
+ protected function __construct(
public BlockType $type,
public array $body,
) {