aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WebAssembly/Execution/Runtime.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/WebAssembly/Execution/Runtime.php')
-rw-r--r--src/WebAssembly/Execution/Runtime.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/WebAssembly/Execution/Runtime.php b/src/WebAssembly/Execution/Runtime.php
index 2604212..1bb440b 100644
--- a/src/WebAssembly/Execution/Runtime.php
+++ b/src/WebAssembly/Execution/Runtime.php
@@ -39,14 +39,13 @@ final class Runtime implements ExporterInterface
) {
}
- /**
- * @param list<ExternVal> $externVals
- */
public static function instantiate(
- Store $store,
Module $module,
- array $externVals,
+ Linker $linker,
): self {
+ $store = $linker->store;
+ $externVals = $linker->resolve($module);
+
$allocator = new Allocator($store);
$moduleInstInit = $allocator->allocPreInitModule($module, $externVals);