@onda-lang/wasm-compiler 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/bin/onda-wasm.js +4 -0
- package/dist/backend/compiler/core.js +175 -289
- package/dist/backend/compiler/expression-tree.js +108 -0
- package/dist/backend/compiler/guarded-addresses.js +243 -0
- package/dist/backend/compiler/index.js +41 -30
- package/dist/backend/compiler/inlining.js +62 -0
- package/dist/backend/compiler/lowering.js +16 -7
- package/dist/backend/compiler/shared.js +15 -9
- package/dist/backend/compiler/simd-reductions.js +229 -0
- package/dist/build.json +5 -5
- package/dist/frontend/onda_compiler_web_bg.wasm +0 -0
- package/dist/frontend/package.json +1 -1
- package/dist/licenses/RUST-DEPENDENCIES.txt +8 -8
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -219,7 +219,8 @@ onda-wasm compile ./main.onda --root . --output ./dist/main.wasm
|
|
|
219
219
|
```
|
|
220
220
|
|
|
221
221
|
The command recursively collects `.onda` files below `--root`, compiles the requested entry, and
|
|
222
|
-
writes an integrity-associated `main.wasm` plus `main.onda.json` descriptor.
|
|
222
|
+
writes an integrity-associated `main.wasm` plus `main.onda.json` descriptor. Arithmetic is strict
|
|
223
|
+
by default. Use `--fast-math` to enable Binaryen's relaxed rewrites. Use `--help` for code
|
|
223
224
|
generation and output options.
|
|
224
225
|
|
|
225
226
|
## Artifact hosting
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The packaged compiler includes the following third-party components:
|
|
4
4
|
|
|
5
|
-
- Binaryen.js
|
|
5
|
+
- Binaryen.js 132.0.0, licensed under Apache-2.0. The complete license is shipped as
|
|
6
6
|
`dist/licenses/BINARYEN-LICENSE.txt`.
|
|
7
7
|
- The Onda WebAssembly math kernel uses `libm` 0.2.16, licensed under MIT. The complete license is
|
|
8
8
|
shipped as `dist/licenses/LIBM-LICENSE.txt`.
|
package/bin/onda-wasm.js
CHANGED
|
@@ -23,6 +23,7 @@ Options:
|
|
|
23
23
|
--optimize-level <0..4> Binaryen optimization level (default: 4)
|
|
24
24
|
--shrink-level <0..2> Binaryen shrink level (default: 0)
|
|
25
25
|
--fast-math Enable relaxed floating-point rewrites
|
|
26
|
+
--strict-math Preserve strict floating-point arithmetic (default)
|
|
26
27
|
--no-simd Disable WebAssembly SIMD code generation
|
|
27
28
|
--wat-out <file> Also write WebAssembly text format
|
|
28
29
|
--help, -h Show this help
|
|
@@ -156,6 +157,9 @@ function parseCompileArguments(args) {
|
|
|
156
157
|
case "--fast-math":
|
|
157
158
|
result.fastMath = true;
|
|
158
159
|
break;
|
|
160
|
+
case "--strict-math":
|
|
161
|
+
result.fastMath = false;
|
|
162
|
+
break;
|
|
159
163
|
case "--no-simd":
|
|
160
164
|
result.simd = false;
|
|
161
165
|
break;
|