summaryrefslogtreecommitdiff
path: root/src/js/binaryen.js-post.js
Commit message (Collapse)AuthorAgeFilesLines
...
* Add optimize, shrink level and debug info options to C/JS (#1357)Daniel Wirtz2018-01-171-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add optimize, shrink level and debug info options to C/JS * Add instantiate functionality for creating additional unique instances of the API * Use a workaround when running tests in node Tests misuse a module as a script by concatenating, so instead of catching this case in the library, catch it there * Update sieve test Seems optimized output changed due to running with optimize levels 2/1 now * Use the options with all pass runners * Update relooper-fuzz C-API test * Share defaults between tools and the C-API * Add a test for optimize levels * Unify node test support in check.by and auto_update_tests.py * Also add getters for optimize levels and test them * Also test debugInfo * Add debug info to C tests that used it as well * Fix missing NODEJS import in auto_update_tests * Detect node.js version (WASM support) * Update hello-world JS test (now also runs with node) * feature-test WebAssembly in node instead * Document that these options apply globally, and where * Make sure hello-world.js output doesn't differ between mozjs/node
* Fixes for #5998 (#1341)Alon Zakai2017-12-301-1465/+1449
| | | | | | | | | | | | | | * binaryen.js and wasm.js don't need filesystem support * newest emscripten no longer uses Runtime.* * build fixes for binaryen.js and wasm.js also move binaryen.js to use standard emscripten MODULARIZE * run binaryen.js in all possible engines ; update js builds * don't emit debug build to a different name, just emit binaryen.js. makes testing easier and safer * remove volatile things from binaryen.js info printing in tests
* Add getters for various specific expression fields to C/JS (#1332)Daniel Wirtz2017-12-201-48/+315
|
* binaryen.js improvements (#1324)Alon Zakai2017-12-071-13/+17
| | | | * binaryen.js improvements: block default value is none, not undefined, and add text-format style aliases for things like getLocal (so you can write get_local as in the text format)
* JS: Make 'segments' optional in setMemory (#1310)Daniel Wirtz2017-11-291-0/+1
| | | Currenty throws if omitted, see AssemblyScript/binaryen.js#2
* Provide AddImport/AddExport for each element in the C-API (#1292)Daniel Wirtz2017-11-221-4/+36
| | | | * Provide AddImport/AddExport for each element in the C-API
* Running passes on a single function in binaryen-c/.js (#1295)Daniel Wirtz2017-11-211-1/+27
| | | * Also other function utilities in C and JS APIs
* Add atomic load/store to binaryen-c/.js (#1298)Daniel Wirtz2017-11-201-0/+42
|
* 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-051-28/+13
| | | | | | * 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-241-2/+870
| | | 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.
* Expand "a.js" export check in binaryen.js to also work when running on ↵juj2016-10-131-1/+2
| | | | Windows. (#767)
* Improvements to build-js.sh and JS API (#679)Rasmus2016-09-021-0/+29
* 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