summaryrefslogtreecommitdiff
path: root/src/js
Commit message (Collapse)AuthorAgeFilesLines
...
* Add Module#emitStackIR to the JS-API (#1717)Daniel Wirtz2018-10-311-0/+10
| | | Related to #1716 (comment)
* Shared memory support for add memory import and set memory functions. (#1686)Nidin Vinayakan2018-10-111-4/+5
|
* Add BinaryenRemoveGlobal / Module.removeGlobal to C/JS API (#1692)Daniel Wirtz2018-10-091-0/+5
|
* Add initial/maximum table size parameters to C/JS API (#1687)Daniel Wirtz2018-09-281-4/+5
|
* Unify imported and non-imported things (#1678)Alon Zakai2018-09-191-27/+8
| | | | | | | | | | | | | | Fixes #1649 This moves us to a single object for functions, which can be imported or nor, and likewise for globals (as a result, GetGlobals do not need to check if the global is imported or not, etc.). All imported things now inherit from Importable, which has the module and base of the import, and if they are set then it is an import. For convenient iteration, there are a few helpers like ModuleUtils::iterDefinedGlobals(wasm, [&](Global* global) { .. use global .. }); as often iteration only cares about imported or defined (non-imported) things.
* remove PageSize and HasFeature, which wasm removed a while back (#1667)Alon Zakai2018-09-121-5/+0
| | | From #1665 (a fuzz bug noticed they were not handled in stack.h).
* BinaryenSetFunctionTable now accepts array of func names not funcs. (#1650)Jay Phelps2018-09-011-2/+4
| | | | | This allows using imports in the table. Fixes #1645
* Proper error handling in add* and get* methods (#1570)Alon Zakai2018-07-101-0/+9
| | | | | | | See #1479 (comment) Also a one-line readme update, remove an obsolete compiler (mir2wasm) and add a new one (asterius). Also improve warning and error reporting in binaryen.js - show a stack trace when relevant (instead of node.js process.exit), and avoid atexit warning spam in debug builds.
* emscripten no longer allows modifying Module['print'] at runtime. Modify the ↵Alon Zakai2018-07-031-9/+9
| | | | internal out() method instead. see kripken/emscripten#6756 (#1614)
* Add a way to remove function types to Binaryen-C/.js (#1536)Daniel Wirtz2018-05-081-0/+5
|
* Expose sign extension ops in Binaryen-C/.js (#1534)Daniel Wirtz2018-05-071-0/+20
|
* Fix hard-wired buffer limit in the JS API (#1394)Daniel Wirtz2018-02-011-21/+16
|
* Sourcemap support for Binaryen C/JS (#1392)Daniel Wirtz2018-01-291-19/+45
| | | | | | * Initial source map support for C/JS * Also test getDebugInfoFileName
* Use Emscripten's MODULARIZE_INSTANCE when building binaryen.js (#1368)Daniel Wirtz2018-01-192-18/+0
|
* Add optimize, shrink level and debug info options to C/JS (#1357)Daniel Wirtz2018-01-172-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-302-1467/+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-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