From 8a083ed74e9f4472441175e187208012927ed357 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 11 Jul 2024 03:50:50 +0900 Subject: feat: simplify ValType structure --- src/WebAssembly/Execution/Stack.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/WebAssembly/Execution/Stack.php') diff --git a/src/WebAssembly/Execution/Stack.php b/src/WebAssembly/Execution/Stack.php index 4181dcd..befa3dc 100644 --- a/src/WebAssembly/Execution/Stack.php +++ b/src/WebAssembly/Execution/Stack.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace Nsfisis\Waddiwasi\WebAssembly\Execution; -use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\RefType; +use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ValType; use function assert; use function count; use function is_float; @@ -54,7 +54,10 @@ final class Stack $this->pushValue((int)$value); } - public function pushRefNull(RefType $type): void + /** + * @param ValType::FuncRef|ValType::ExternRef $type + */ + public function pushRefNull(ValType $type): void { $this->pushValue(Ref::RefNull($type)); } -- cgit v1.2.3-70-g09d2