aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WebAssembly/BinaryFormat
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-11 04:20:25 +0900
committernsfisis <nsfisis@gmail.com>2024-07-11 04:20:25 +0900
commit5be97eadbb1065f842aad4341cd4732498e0553b (patch)
tree827560953ea0abf494b3bb7aae9a987d105a8da3 /src/WebAssembly/BinaryFormat
parent8a083ed74e9f4472441175e187208012927ed357 (diff)
downloadphp-waddiwasi-5be97eadbb1065f842aad4341cd4732498e0553b.tar.gz
php-waddiwasi-5be97eadbb1065f842aad4341cd4732498e0553b.tar.zst
php-waddiwasi-5be97eadbb1065f842aad4341cd4732498e0553b.zip
feat: simplify FuncType structure
Diffstat (limited to 'src/WebAssembly/BinaryFormat')
-rw-r--r--src/WebAssembly/BinaryFormat/Decoder.php8
1 files changed, 5 insertions, 3 deletions
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<ValType>
+ */
+ private function decodeResultType(): array
{
- return new ResultType($this->decodeVec($this->decodeValType(...)));
+ return $this->decodeVec($this->decodeValType(...));
}
private function decodeFuncType(): FuncType