summaryrefslogtreecommitdiff
path: root/bin/binaryen.js
Commit message (Collapse)AuthorAgeFilesLines
* Also clear imports and exports maps in BinaryenModuleDispose (#1372)Daniel Wirtz2018-01-191-17/+17
| | | | | | fixes #1369 * Update binaries and kitchen-sink test
* Use Emscripten's MODULARIZE_INSTANCE when building binaryen.js (#1368)Daniel Wirtz2018-01-191-176/+202
|
* Refactor optimization defaults (#1366)Alon Zakai2018-01-171-32/+28
| | | | | Followup to #1357. This moves the optimization settings into pass.h, and uses it from there in the various places. This also splits up huge lines from the tracing code, which put all block children (whose number can be arbitrarily large) on one line. This seems to have caused random errors on the bots, I suspect from overflowing a buffer. Anyhow, it's much more clear to split the lines at a reasonable length.
* Add optimize, shrink level and debug info options to C/JS (#1357)Daniel Wirtz2018-01-171-200/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Optimize out memory and table when possible (#1352)Alon Zakai2018-01-101-110/+107
| | | We can remove the memory/table (itself, or an import if imported) if they are not used. This is pretty minor on a large wasm file, but when reading small wasts it's very noticeable to have an unused memory and table all the time.
* Validation fixes for #1317 (#1347)Alon Zakai2018-01-031-87/+86
| | | | | | | * add get_global/set_global validation * validate get_local index * update builds * fix tests
* Fixes for #5998 (#1341)Alon Zakai2017-12-301-841/+204
| | | | | | | | | | | | | | * 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-250/+841
|
* binaryen.js improvements (#1324)Alon Zakai2017-12-071-755/+240
| | | | * 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-271/+271
| | | Currenty throws if omitted, see AssemblyScript/binaryen.js#2
* Provide AddImport/AddExport for each element in the C-API (#1292)Daniel Wirtz2017-11-221-688/+693
| | | | * 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-663/+666
| | | * Also other function utilities in C and JS APIs
* Add atomic load/store to binaryen-c/.js (#1298)Daniel Wirtz2017-11-201-247/+757
|
* Fix js builds and add testing (#1291)Alon Zakai2017-11-181-753/+247
| | | | | | | | * run emscripten tests on travis docker run, which has emcc. this verifies that the built wasm.js&binaryen.js works * run binaryen.js and wasm.js tests before *and* after, to check the new build and also the bundled build * updated js builds
* Add const expression utilities to binaryen-c/.js (#1288)Daniel Wirtz2017-11-151-537/+540
|
* Add atomic ops to binaryen.js (#1280)Daniel Wirtz2017-11-131-735/+746
|
* Added expression utility functions to binaryen-c/.js (#1269)Daniel Wirtz2017-11-111-233/+738
|
* Fix binaryen.js's wasm2asm (#1257)Alon Zakai2017-11-011-732/+233
| | | | * fix wasm2asm in binaryen.js, the function locals may not all have names, so add them as necessary
* Added the ability to run specific optimization passes to binaryen-c/.js (#1252)Daniel Wirtz2017-10-301-666/+708
|
* Initial asm.js output for binaryen-c / binaryen.js (#1136)Daniel Wirtz2017-08-241-597/+625
| | | | * Added BinaryenModulePrintAsmjs (using wasm2asm) + Module#emitAsmjs JS binding
* add docs and error hints when a Call should be a CallImport (#1081)Alon Zakai2017-07-111-651/+657
| | | | | | * add docs and error hints when a Call should be a CallImport * fix binaryen API docs in docs/
* Unified module loader support in binaryen.js (#1074)Daniel Wirtz2017-07-051-590/+601
| | | | | | * 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-614/+632
| | | | | | * add C API and binaryen.js support for parsing s-expressions * update js builds and tests
* fix interpreted code from wasm.js (#1043)Alon Zakai2017-06-121-526/+528
| | | | | | * fix interpreted code from wasm.js, when the result is none, we must return an empty Literal (the interpreter now asserts on this, it didn't before) * update js builds
* Update binaryen-c/binaryen.js, fixes #1028, fixes #1029 (#1030)Daniel Wirtz2017-06-071-575/+615
| | | 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.
* update wasm.js and binaryen.js (#977)Alon Zakai2017-04-191-492/+493
| | | | | | * update wasm.js and binaryen.js * update test output for new names section
* New binaryen.js (#922)Alon Zakai2017-03-241-463/+583
| | | 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.
* Fixes fround of an unsigned integer (#821)Alon Zakai2016-11-041-418/+420
| | | | | | | | * fix fround of unsigned * add testing for f32 ops, and remove a duplicate test (now that f32 is on by default in wasm, we don't need to check with and without PRECISE_F32) * update wasm.js and binaryen.js
* update wasm.js and binaryen.js (#806)Alon Zakai2016-10-261-446/+447
|
* Add support for i64.store[N] (#789)jgravelle-google2016-10-191-386/+389
| | | | | | | | | | | | * Add support for i64.store[N] Previously storing i64 in the interpreter assumed an 8byte store. Stores like i64.store8 would then use the special-case i64 storing code, when they could just use the i32.store8 code. * Add printf test for interpreter * Update wasm.js
* Expand "a.js" export check in binaryen.js to also work when running on ↵juj2016-10-131-1/+1
| | | | Windows. (#767)
* Update wasm.js (#743)Derek Schuff2016-10-041-295/+295
| | | Compatible with #740
* Update wasm.js (#737)Derek Schuff2016-10-041-318/+322
| | | Update the build so it accepts the binary format changes from #733
* Type check block/loop/if sigs (#717)Alon Zakai2016-09-281-264/+266
| | | | | | * type check using block/loop/if types provided in text and binary formats. * print if and loop sigs which were missing. * remove dsl from OptimizeInstructions as after those changes it needs rethinking.
* update wasm.js and binaryen.jsAlon Zakai2016-09-211-290/+314
|
* update wasm.js and binaryen.jsAlon Zakai2016-09-071-418/+423
|
* Improvements to build-js.sh and JS API (#679)Rasmus2016-09-021-84635/+425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Use Module instead of AllocatingModule in binaryen.js tests (#391)Jan Wolski2016-04-251-11016/+22471
| | | | | | * Use Module instead of AllocatingModule in binaryen.js tests * include compiled binaryen.js, too
* add testing for binaryen.jsAlon Zakai2016-04-041-0/+73186