From 485f8ac9025bc568a328c1d1af4572dcd2fc85a7 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 10 Nov 2022 17:08:47 +0100 Subject: [PATCH] Wasi: fix file system issues, add support for Math.pow --- .idea/runConfigurations/run_tests__wasi_.xml | 22 + .../org/teavm/classlib/java/lang/TMath.java | 11 +- .../org/teavm/backend/wasm/WasmTarget.java | 2 + .../wasm/intrinsics/AddressIntrinsic.java | 9 + .../backend/wasm/runtime/WasiSupport.java | 5 + .../backend/wasm/runtime/WasmSupport.java | 3 + .../wasm/runtime/fs/WasiFileSystem.java | 10 +- .../wasm/runtime/fs/WasiVirtualFile.java | 2 +- .../backend/wasm/runtime/math/WasmPow.java | 675 ++++++++++++++++++ .../WasiFileSystemProviderTransformer.java | 30 + tests/run-wasi.sh | 1 + 11 files changed, 761 insertions(+), 9 deletions(-) create mode 100644 .idea/runConfigurations/run_tests__wasi_.xml create mode 100644 core/src/main/java/org/teavm/backend/wasm/runtime/math/WasmPow.java create mode 100644 core/src/main/java/org/teavm/backend/wasm/transformation/WasiFileSystemProviderTransformer.java create mode 100755 tests/run-wasi.sh diff --git a/.idea/runConfigurations/run_tests__wasi_.xml b/.idea/runConfigurations/run_tests__wasi_.xml new file mode 100644 index 000000000..e543ff1eb --- /dev/null +++ b/.idea/runConfigurations/run_tests__wasi_.xml @@ -0,0 +1,22 @@ + + + + + + + +