From 900377463a8264871ee42e488112b076b7973b6a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 27 Jan 2024 13:22:56 +0900 Subject: feat: partially implement execution --- src/Execution/StackEntries/Frame.php | 23 +++++++++++++++++++++++ src/Execution/StackEntries/Label.php | 21 +++++++++++++++++++++ src/Execution/StackEntries/Value.php | 16 ++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 src/Execution/StackEntries/Frame.php create mode 100644 src/Execution/StackEntries/Label.php create mode 100644 src/Execution/StackEntries/Value.php (limited to 'src/Execution/StackEntries') diff --git a/src/Execution/StackEntries/Frame.php b/src/Execution/StackEntries/Frame.php new file mode 100644 index 0000000..f8bd68e --- /dev/null +++ b/src/Execution/StackEntries/Frame.php @@ -0,0 +1,23 @@ + $arity + * @param list $locals + */ + public function __construct( + public int $arity, + public array $locals, + public ModuleInst $module, + ) { + } +} diff --git a/src/Execution/StackEntries/Label.php b/src/Execution/StackEntries/Label.php new file mode 100644 index 0000000..b83fb0f --- /dev/null +++ b/src/Execution/StackEntries/Label.php @@ -0,0 +1,21 @@ + $arity + * @param list $target + */ + public function __construct( + public int $arity, + public array $target, + ) { + } +} diff --git a/src/Execution/StackEntries/Value.php b/src/Execution/StackEntries/Value.php new file mode 100644 index 0000000..1cd1146 --- /dev/null +++ b/src/Execution/StackEntries/Value.php @@ -0,0 +1,16 @@ +