From 3702e772d72cb46c6cb13e21d570427bd0b4e493 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 13 Mar 2024 23:11:23 +0900 Subject: perf: make Val to primitive --- src/Execution/Allocator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Execution/Allocator.php') diff --git a/src/Execution/Allocator.php b/src/Execution/Allocator.php index 730574b..299e761 100644 --- a/src/Execution/Allocator.php +++ b/src/Execution/Allocator.php @@ -44,7 +44,7 @@ final readonly class Allocator /** * @param list $externVals - * @param list $vals + * @param list $vals * @param list> $refsList * @param list $preAllocatedFuncs */ @@ -134,7 +134,7 @@ final readonly class Allocator return count($this->store->mems) - 1; } - private function allocGlobal(GlobalType $globalType, Val $val): int + private function allocGlobal(GlobalType $globalType, int|float|Ref $val): int { $globalInst = new GlobalInst($globalType, $val); $this->store->globals[] = $globalInst; -- cgit v1.3-1-g0d28