From 077c2b4e3b7168a297f5518876dca8ca9a390578 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> Date: Fri, 23 Apr 2021 08:49:01 +0700 Subject: [PATCH] Update README.md in kmath-ast --- kmath-ast/README.md | 5 +++-- kmath-ast/docs/README-TEMPLATE.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kmath-ast/README.md b/kmath-ast/README.md index eedba16fa..1ee78956e 100644 --- a/kmath-ast/README.md +++ b/kmath-ast/README.md @@ -50,7 +50,7 @@ For example, the following builder: MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField) ``` -… leads to generation of bytecode, which can be decompiled to the following Java class: +... leads to generation of bytecode, which can be decompiled to the following Java class: ```java package space.kscience.kmath.asm.generated; @@ -97,6 +97,7 @@ var executable = function (constants, arguments) { }; ``` +JS also supports very experimental expression optimization with [WebAssembly](https://webassembly.org/) IR generation. Currently, only expressions inside `DoubleField` and `IntRing` are supported. ```kotlin import space.kscience.kmath.wasm.* @@ -104,7 +105,7 @@ import space.kscience.kmath.wasm.* MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField) ``` -An example of emitted WASM IR in the form of WAT: +An example of emitted Wasm IR in the form of WAT: ```lisp (func $executable (param $0 f64) (result f64) diff --git a/kmath-ast/docs/README-TEMPLATE.md b/kmath-ast/docs/README-TEMPLATE.md index b38311ea1..1ecf477ef 100644 --- a/kmath-ast/docs/README-TEMPLATE.md +++ b/kmath-ast/docs/README-TEMPLATE.md @@ -19,7 +19,7 @@ For example, the following builder: MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField) ``` -… leads to generation of bytecode, which can be decompiled to the following Java class: +... leads to generation of bytecode, which can be decompiled to the following Java class: ```java package space.kscience.kmath.asm.generated; @@ -66,6 +66,7 @@ var executable = function (constants, arguments) { }; ``` +JS also supports very experimental expression optimization with [WebAssembly](https://webassembly.org/) IR generation. Currently, only expressions inside `DoubleField` and `IntRing` are supported. ```kotlin import space.kscience.kmath.wasm.* @@ -73,7 +74,7 @@ import space.kscience.kmath.wasm.* MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField) ``` -An example of emitted WASM IR in the form of WAT: +An example of emitted Wasm IR in the form of WAT: ```lisp (func \$executable (param \$0 f64) (result f64) -- 2.34.1