aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Execution/Allocator.php
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-13 23:11:23 +0900
committernsfisis <nsfisis@gmail.com>2024-03-13 23:11:23 +0900
commit3702e772d72cb46c6cb13e21d570427bd0b4e493 (patch)
tree61949354c5c546200797cad9f1ad520e258b93a6 /src/Execution/Allocator.php
parent804dea0ddefe826f535738cda9cc5ad900c083c4 (diff)
downloadphp-waddiwasi-3702e772d72cb46c6cb13e21d570427bd0b4e493.tar.gz
php-waddiwasi-3702e772d72cb46c6cb13e21d570427bd0b4e493.tar.zst
php-waddiwasi-3702e772d72cb46c6cb13e21d570427bd0b4e493.zip
perf: make Val to primitive
Diffstat (limited to 'src/Execution/Allocator.php')
-rw-r--r--src/Execution/Allocator.php4
1 files changed, 2 insertions, 2 deletions
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<ExternVal> $externVals
- * @param list<Val> $vals
+ * @param list<int|float|Ref> $vals
* @param list<list<Ref>> $refsList
* @param list<int> $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;