diff options
Diffstat (limited to 'Userland/Utilities/wasm.cpp')
-rw-r--r-- | Userland/Utilities/wasm.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/Userland/Utilities/wasm.cpp b/Userland/Utilities/wasm.cpp index 8521c8b5ac..bea9796b4f 100644 --- a/Userland/Utilities/wasm.cpp +++ b/Userland/Utilities/wasm.cpp @@ -204,17 +204,8 @@ static bool pre_interpret_hook(Wasm::Configuration& config, Wasm::InstructionPoi if (!result.values().is_empty()) warnln("Returned:"); for (auto& value : result.values()) { - auto str = value.value().visit( - [&]<typename T>(const T& value) { - if constexpr (requires { value.value(); }) - return String::formatted(" -> addr{} ", value.value()); - else if constexpr (IsSame<Wasm::Value::Null, T>) - return String::formatted(" ->addr(null)"); - else - return String::formatted(" -> {} ", value); - }); - g_stdout.write(str.bytes()); - g_printer.print(value.type()); + g_stdout.write(" -> "sv.bytes()); + g_printer.print(value); } continue; } @@ -541,17 +532,9 @@ int main(int argc, char* argv[]) if (!result.values().is_empty()) warnln("Returned:"); for (auto& value : result.values()) { - value.value().visit( - [&]<typename T>(const T& value) { - if constexpr (requires { value.value(); }) - out(" -> addr{} ", value.value()); - else if constexpr (IsSame<Wasm::Value::Null, T>) - out(" ->addr(null)"); - else - out(" -> {} ", value); - }); Wasm::Printer printer { stream }; - printer.print(value.type()); + g_stdout.write(" -> "sv.bytes()); + g_printer.print(value); } } } |