From 5be97eadbb1065f842aad4341cd4732498e0553b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 11 Jul 2024 04:20:25 +0900 Subject: feat: simplify FuncType structure --- src/WebAssembly/BinaryFormat/Decoder.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/WebAssembly/BinaryFormat') diff --git a/src/WebAssembly/BinaryFormat/Decoder.php b/src/WebAssembly/BinaryFormat/Decoder.php index e6e8bfb..0ec342c 100644 --- a/src/WebAssembly/BinaryFormat/Decoder.php +++ b/src/WebAssembly/BinaryFormat/Decoder.php @@ -31,7 +31,6 @@ use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\GlobalType; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\Limits; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\MemType; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\Mut; -use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ResultType; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\TableType; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ValType; use function array_reduce; @@ -284,9 +283,12 @@ final class Decoder return $this->decodeU32(); } - private function decodeResultType(): ResultType + /** + * @return list + */ + private function decodeResultType(): array { - return new ResultType($this->decodeVec($this->decodeValType(...))); + return $this->decodeVec($this->decodeValType(...)); } private function decodeFuncType(): FuncType -- cgit v1.2.3-70-g09d2