| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
* Added BinaryenModulePrintAsmjs (using wasm2asm) + Module#emitAsmjs JS binding
|
|
|
|
|
|
| |
* Unified module loader support in binaryen.js
* Recompiled binaryen.js and wasm.js
|
|
|
|
|
|
| |
* add C API and binaryen.js support for parsing s-expressions
* update js builds and tests
|
|
|
| |
This PR adds global variable support (addGlobal, getGlobal, setGlobal), host operations (currentMemory, growMemory), a few utility functions (removeImport, removeExport, getFunctionTypeBySignature with the latter being scheduled for removal once a better alternative is in place) and it introduces an additional argument to specify the result type in BinaryenBlock (effectively breaking the C-API but retaining previous behaviour by introducing the BinaryenUndefined() type for this purpose). Additionally, it enables compilation with exception support in build-js.sh as exceptions are thrown and caught when optimizing endless loops, intentionally resulting in an unreachable opcode. Affected test cases have been updated accordingly.
|
|
|
| |
New binaryen.js implementation, based on the C API underneath and with a JS-friendly API on top. See docs under docs/ for API details.
|
|
|
|
|
|
| |
* improve precise integer operations: call into a wasm function to do the possibly-trapping div/rem, which handles the corner cases, instead of an ffi. also fix a bug in the existing parallel 64-bit code for this
* remove no longer needed wasm.js-post.js file (it moved into emscripten repo)
|
|\
| |
| | |
Dynamic linking
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
| |
* run wasm natively by default, no fallbacks to interpreting
* improve error message, suggesting people add methods if they want more
|
|
|
|
| |
wasm compilation fail (#834)
|
|
|
|
| |
Windows. (#767)
|
|
|
|
| |
tells us if it succeeded, and then the new buffer can be found on the Memory object
|
| |
|
|
|
|
| |
native builds too
|
| |
|
| |
|
|
|
|
|
|
| |
* use new WebAssembly.Instance/Module API
* detect presence of wasm with WebAssembly object
|
| |
|
| |
|
| |
|
|
|
|
| |
mergeMemory
|
|
|
|
|
|
|
|
| |
apply memory segments only if there isn't a memory initializer (which we need for asmjs and asm2wasm modes)
use wasm-opt to check recreated wasts for validity, as wasm-shell would try to execute them
add testing for combined modes like asmjs,interpret-binary
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Adds command-line argument to build-js.sh for specifying the location of Emscripten. Also spreads out program arguments on separate lines
* Exposes WasmBinaryWriter and BufferWithRandomAccess in the JS API to allow writing WASM modules and access the produced bytes via the JS API
* Updates bin/binaryen.js and bin/wasm.js from changes to build-js.sh
* Adds exclude patterns to .gitignore for some files generated by build-js.sh and .DS_Store for macOS
* Changes build-js.sh to use EMSCRIPTEN env var instead of a command-line argument to provide the path to emscripten
* Improvements to JS builds
- Adds -g flag to build-js.sh that will build unoptimized and unmangled versions of binaryen.js and wasm.js (output has a "-g.js" suffix to allow co-existence with regular optimized builds).
- Enables closure compiler for non-debug builds
- Adds browser test for s-expression parser + WASM code gen (requires wasm to be enabled in the browser.)
- Adds iterator interface to BufferWithRandomAccess (when Symbol.iterator is available)
- Adds toArrayBuffer to BufferWithRandomAccess (when TypedArray is available)
- Adds compileWast(sourceText :string) :ArrayBuffer to the module, parsing & compiling s-expression code to a WASM module
- Changes the way binaryen.js is exported to allow usage in CommonJS, AMD and UMD envionments.
* Expose "Binaryen" global in a better way to work with a.js generated by check.py
* Fix to binaryen.js to only export a global variable when running the test (a.js) while inside a module (avoids polluting global in e.g. nodejs). Also fixes a spelling mistake.
* Better "no WASM detected" message in test/binaryen.js/browser.html
* Small change to error message in build-js.sh where $EMSCRIPTEN does not point to a directory
* Changes emcc args in build-js.sh after investingating a large number of argument combinations. Also adds a browser benchmark. The result of emcc arguments and the effect on performance is summarized in this doc: https://gist.github.com/rsms/e33c61a25a31c08260161a087be03169
* Enable inferring emscripten path by looking in PATH when EMSCRIPTEN is not set in env
|
|
|
|
| |
can trap (#637)
|
| |
|
| |
|
|
|
|
| |
as possible. this lets us recover from wasm compilation failures and still do a fallback method
|
|
|
|
|
|
| |
* Use Module instead of AllocatingModule in binaryen.js tests
* include compiled binaryen.js, too
|
|
|
|
|
|
|
| |
Continuation of #345 (see https://github.com/WebAssembly/binaryen/commit/2887883029de293458344a5d564039074d93246e#diff-499c4e70c8aadb9837261ebcc4725f78R262)
Currently building of binaryen.js fails with
"src/../glue.cpp:102:14: error: no matching constructor for initialization of
'wasm::SExpressionWasmBuilder'"
|
|
|
|
| |
the distinction is not really that useful, and passes do need to allocate, so we would need to pass around AllocatingModules all around anyhow. (#361)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|