summaryrefslogtreecommitdiff
path: root/src/js
Commit message (Collapse)AuthorAgeFilesLines
...
* Add const expression utilities to binaryen-c/.js (#1288)Daniel Wirtz2017-11-151-0/+19
|
* Add atomic ops to binaryen.js (#1280)Daniel Wirtz2017-11-131-0/+180
|
* Added expression utility functions to binaryen-c/.js (#1269)Daniel Wirtz2017-11-111-0/+37
|
* Added the ability to run specific optimization passes to binaryen-c/.js (#1252)Daniel Wirtz2017-10-301-0/+7
|
* Initial asm.js output for binaryen-c / binaryen.js (#1136)Daniel Wirtz2017-08-241-0/+8
| | | | * Added BinaryenModulePrintAsmjs (using wasm2asm) + Module#emitAsmjs JS binding
* Unified module loader support in binaryen.js (#1074)Daniel Wirtz2017-07-052-29/+15
| | | | | | * Unified module loader support in binaryen.js * Recompiled binaryen.js and wasm.js
* S-expression parsing in C API and binaryen.js (#1050)Alon Zakai2017-06-131-0/+8
| | | | | | * add C API and binaryen.js support for parsing s-expressions * update js builds and tests
* Update binaryen-c/binaryen.js, fixes #1028, fixes #1029 (#1030)Daniel Wirtz2017-06-071-3/+41
| | | 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 (#922)Alon Zakai2017-03-244-139/+871
| | | 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.
* Optimize precise mode integer ops (#907)Alon Zakai2017-02-161-351/+0
| | | | | | * 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)
* Merge pull request #859 from WebAssembly/linkingAlon Zakai2016-12-271-1/+7
|\ | | | | Dynamic linking
| * export the wasm table on ModuleAlon Zakai2016-12-071-0/+1
| |
| * use wasmMaxTableSizeAlon Zakai2016-12-071-1/+6
| |
* | use exported static base and bump (#853)Alon Zakai2016-12-061-2/+2
|/
* Run wasm natively by default, no fallbacks to interpreting (#838)Alon Zakai2016-11-111-2/+2
| | | | | | * run wasm natively by default, no fallbacks to interpreting * improve error message, suggesting people add methods if they want more
* show a warning with guidance when a memory size incompatibility issue makes ↵Alon Zakai2016-11-101-0/+3
| | | | wasm compilation fail (#834)
* Expand "a.js" export check in binaryen.js to also work when running on ↵juj2016-10-131-1/+2
| | | | Windows. (#767)
* handle memory growth with native wasm support: the result of grow_memory ↵Alon Zakai2016-10-111-2/+12
| | | | tells us if it succeeded, and then the new buffer can be found on the Memory object
* wasmTableSize of 0 is allowedAlon Zakai2016-10-111-1/+2
|
* refactor memoryBase and tableBase init to a shared location, so it affects ↵Alon Zakai2016-10-111-7/+7
| | | | native builds too
* use wasmTableSize when providedAlon Zakai2016-10-111-1/+1
|
* use 0xc Memory and Table in JS glue (#752)Alon Zakai2016-10-071-5/+18
|
* Use new WebAssembly API (#724)Alon Zakai2016-10-031-2/+2
| | | | | | * use new WebAssembly.Instance/Module API * detect presence of wasm with WebAssembly object
* import memoryBase and tableBaseAlon Zakai2016-09-071-2/+5
|
* import tableAlon Zakai2016-09-071-1/+4
|
* import memory #684Alon Zakai2016-09-071-1/+6
|
* refactor reallocBuffer assignment location, it is not technically part of ↵Alon Zakai2016-09-071-6/+8
| | | | mergeMemory
* add asm2wasm option to import a mem init fileAlon Zakai2016-09-071-2/+9
| | | | | | | | 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
* use globals in asm2wasmAlon Zakai2016-09-071-28/+0
|
* Improvements to build-js.sh and JS API (#679)Rasmus2016-09-024-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* emit safe calls for i32 div/rem when in precise mode in asm2wasm, as they ↵Alon Zakai2016-07-141-0/+12
| | | | can trap (#637)
* make wasm.js safe in closure compiler (#438)Alon Zakai2016-05-051-1/+1
|
* fall back from wasm compilation errors, and add loggingAlon Zakai2016-04-281-3/+12
|
* refactor js/wasm glue to defer the wasm/wasm-polyfill/asmjs-fallback as late ↵Alon Zakai2016-04-281-96/+100
| | | | 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 (#391)Jan Wolski2016-04-251-0/+1
| | | | | | * Use Module instead of AllocatingModule in binaryen.js tests * include compiled binaryen.js, too
* Removes wasm-s-parser debug logging from binaryen.idl. (#373)Yury Delendik2016-04-211-1/+1
| | | | | | | 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'"
* remove the AllocatingModule class, and just make Module have allocations. ↵Alon Zakai2016-04-181-7/+1
| | | | 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)
* more idl additions fix idl testAlon Zakai2016-04-041-0/+3
|
* more idlAlon Zakai2016-04-041-0/+16
|
* add necessary idl constructorsAlon Zakai2016-04-041-0/+4
|
* add simpler constructor for SExpressionWasmBuilderAlon Zakai2016-04-041-0/+51
|
* fix reallocBuffer to send growWasmMemory a size in pagesAlon Zakai2016-04-011-1/+4
|
* if Module.asm is already set, use thatAlon Zakai2016-03-241-1/+4
|
* note when we are using wasmAlon Zakai2016-03-231-0/+2
|
* quote strings for closure compilerAlon Zakai2016-03-231-4/+4
|
* fix memory growth #270Alon Zakai2016-03-221-10/+9
|
* improve method namesAlon Zakai2016-03-181-15/+15
|
* finish wasm-binary method and update emscriptenAlon Zakai2016-03-121-3/+8
|
* refactor wasm.js and prepare for loading and interpreting binariesAlon Zakai2016-03-121-22/+37
|
* log failures in wasm/js integrationAlon Zakai2016-03-111-4/+16
|