TurboScript
TurboScript copied to clipboard
Standard libs like Math and polyfills (charCodeAt, fromCharCode, etc)
According to this: https://github.com/WebAssembly/design/blob/master/FAQ.md we need manually implement all sets of js enviroment. This is big job. I could help with this
UPD I see some stdlib already implement with direct binding to Wasm opcodes.
How you bind Math library to Wasm right now? It seems just import from js according this: https://github.com/01alchemist/TurboScript/blob/master/tests/math-wasm.html.
~~One more thing. In declared set of WasmOpcodes are missing f32_fma and f64_fma commands: https://github.com/01alchemist/TurboScript/blob/master/src/wasm/opcode.ts~~
Sorry, this post MVP feature. Not implement yet.
Right now importing from JavaScript built-in. I need to implement method overload to use same functions for different signatures like in JavaScript. It's a big task to implement all built-ins manually. We need to wait for WASM 2 Specification to be finalized before implementing this manually. For now, for compatibility we can import slow Math library from JS and gradually add fast implementations in WASM.
That's right we definitely need fma command for IEEE-754 (2008) compatible sin, cos, log and etc, but min, max, sqrt, rounding and abs we already has direct equivalents in wasm, so we can use them now
Sure we can implement direct equalents right away. right now built-in classes and functions are located inside library folder.
Be sure there are no associated costs for modules that don't use these features.
Tree shaking should remove unused functions. So there will be no extra cost.
On Wed 12. Apr 2017 at 4:32 PM, Wink Saville [email protected] wrote:
Be sure there are no associated costs for modules that don't use these features.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/01alchemist/TurboScript/issues/14#issuecomment-293596150, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMGZq9tB3h_EE-GiNmmTsGBwi1ONUnIks5rvOBegaJpZM4MorMz .
@nidin Is it possible use wasm's sqrt, clz, ctz, popcount, copysign and etc now?
Not yet. No work done in that direction. You are free to investigate.
On Wed 12. Apr 2017 at 5:55 PM, Max Graey [email protected] wrote:
@nidin https://github.com/nidin Is it possible use wasm's sqrt, clz, ctz, popcount, copysign and etc now?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/01alchemist/TurboScript/issues/14#issuecomment-293623992, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMGZkyvyTS8mo_YLFfkXEHAvIRcb0bBks5rvPPcgaJpZM4MorMz .