summaryrefslogtreecommitdiff
path: root/Userland/Utilities/wasm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Utilities/wasm.cpp')
-rw-r--r--Userland/Utilities/wasm.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Utilities/wasm.cpp b/Userland/Utilities/wasm.cpp
index fa3d910cc9..eed9f3ccd0 100644
--- a/Userland/Utilities/wasm.cpp
+++ b/Userland/Utilities/wasm.cpp
@@ -70,6 +70,7 @@ int main(int argc, char* argv[])
warnln("Module instantiation failed: {}", result.error().error);
return 1;
}
+ auto module_instance = result.release_value();
auto stream = Core::OutputFileStream::standard_output();
auto print_func = [&](const auto& address) {
@@ -90,7 +91,7 @@ int main(int argc, char* argv[])
};
if (print) {
// Now, let's dump the functions!
- for (auto& address : machine.module_instance().functions()) {
+ for (auto& address : module_instance.functions()) {
print_func(address);
}
}
@@ -98,7 +99,7 @@ int main(int argc, char* argv[])
if (!exported_function_to_execute.is_empty()) {
Optional<Wasm::FunctionAddress> run_address;
Vector<Wasm::Value> values;
- for (auto& entry : machine.module_instance().exports()) {
+ for (auto& entry : module_instance.exports()) {
if (entry.name() == exported_function_to_execute) {
if (auto addr = entry.value().get_pointer<Wasm::FunctionAddress>())
run_address = *addr;