summaryrefslogtreecommitdiff
path: root/src/binaryen-c.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Add except_ref type (#2081)Heejin Ahn2019-05-071-0/+1
| | | | This adds except_ref type, which is a part of the exception handling proposal.
* Apply format changes from #2048 (#2059)Alon Zakai2019-04-261-134/+365
| | | Mass change to apply clang-format to everything. We are applying this in a PR by me so the (git) blame is all mine ;) but @aheejin did all the work to get clang-format set up and all the manual work to tidy up some things to make the output nicer in #2048
* Fix typo in C API: BinaryeGlobalImportGetModule -> ↵Bastian Müller2019-04-241-1/+1
| | | | BinaryenGlobalImportGetModule (#2047)
* Passive segments (#1976)Thomas Lively2019-04-051-1/+1
| | | | | Adds support for the bulk memory proposal's passive segments. Uses a new (data passive ...) s-expression syntax to mark sections as passive.
* Rename atomic wait/notify instructions (#1972)Heejin Ahn2019-03-301-4/+4
| | | | | | | | This renames the following: - `i32.wait` -> `i32.atomic.wait` - `i64.wait` -> `i64.atomic.wait` - `wake` -> `atomic.notify` to match the spec.
* Add BinaryenConstGetValueV128 to C/JS-API (#1931)Daniel Wirtz2019-03-131-0/+1
| | | | | | | This PR adds void BinaryenConstGetValueV128(BinaryenExpressionRef expr, uint8_t* out); to the C-API and uses it in Binaryen.getExpressionInfo in the JS-API.
* Bulk memory operations (#1892)Thomas Lively2019-02-051-0/+22
| | | | | | Bulk memory operations The only parts missing are the interpreter implementation and spec tests.
* Rename `idx` to `index` in SIMD code for consistency (#1836)Thomas Lively2018-12-181-4/+4
|
* SIMD (#1820)Thomas Lively2018-12-131-80/+169
| | | | | | | | | Implement and test the following functionality for SIMD. - Parsing and printing - Assembling and disassembling - Interpretation - C API - JS API
* Implement nontrapping float-to-int instructions (#1780)Thomas Lively2018-12-041-0/+8
|
* Add v128 type (#1777)Thomas Lively2018-11-291-0/+1
|
* fix some () vs (void) C warnings in the C API (#1768)Alon Zakai2018-11-261-3/+3
| | | Fixes #1766
* Relooper CFG optimizations (#1759)Alon Zakai2018-11-211-2/+2
| | | | | | | | | | | | | | | | Previously the relooper would do some optimizations when deciding when to use an if vs a switch, how to group blocks, etc. This PR adds an additional pre-optimization phase with some basic but useful simplify-cfg style passes, * Skip empty blocks when they have just one exit. * Merge exiting branches when they are equivalent. * Canonicalize block contents to make such comparisons more useful. * Turn a trivial one-target switch into a simple branch. This can help in noticeable ways when running the rereloop pass, e.g. on LLVM wasm backend output. Also: * Binaryen C API changes to the relooper, which now gets a Module for its constructor. It needs it for the optimizations, as it may construct new nodes. * Many relooper-fuzzer improvements. * Clean up HashType usage.
* Shared memory support for add memory import and set memory functions. (#1686)Nidin Vinayakan2018-10-111-2/+2
|
* Add BinaryenRemoveGlobal / Module.removeGlobal to C/JS API (#1692)Daniel Wirtz2018-10-091-0/+1
|
* Add initial/maximum table size parameters to C/JS API (#1687)Daniel Wirtz2018-09-281-1/+1
|
* Unify imported and non-imported things (#1678)Alon Zakai2018-09-191-34/+12
| | | | | | | | | | | | | | 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-2/+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-14/+14
| | | | | This allows using imports in the table. Fixes #1645
* Minor code cleanups (#1617)Alon Zakai2018-07-101-1/+2
| | | | | | * code cleanups in wasm-binary: remove an & param, and standardize whitespace * add some docs for how the relooper handles blocks with no outgoing branches [ci skip]
* Add a way to remove function types to Binaryen-C/.js (#1536)Daniel Wirtz2018-05-081-0/+2
|
* Expose sign extension ops in Binaryen-C/.js (#1534)Daniel Wirtz2018-05-071-0/+5
|
* Fix hard-wired buffer limit in the JS API (#1394)Daniel Wirtz2018-02-011-0/+14
|
* Sourcemap support for Binaryen C/JS (#1392)Daniel Wirtz2018-01-291-0/+20
| | | | | | * Initial source map support for C/JS * Also test getDebugInfoFileName
* Refactor optimization defaults (#1366)Alon Zakai2018-01-171-1/+0
| | | | | 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-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add getters for various specific expression fields to C/JS (#1332)Daniel Wirtz2017-12-201-9/+244
|
* Provide AddImport/AddExport for each element in the C-API (#1292)Daniel Wirtz2017-11-221-2/+21
| | | | * 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/+20
| | | * Also other function utilities in C and JS APIs
* Add atomic load/store to binaryen-c/.js (#1298)Daniel Wirtz2017-11-201-0/+2
|
* Add const expression utilities to binaryen-c/.js (#1288)Daniel Wirtz2017-11-151-0/+12
|
* Added expression utility functions to binaryen-c/.js (#1269)Daniel Wirtz2017-11-111-0/+37
|
* Added BinaryenAtomic* incl. ops to binaryen-c (#1276)Daniel Wirtz2017-11-091-0/+10
| | | | | | * Added BinaryenAtomicRMW incl. ops to binaryen-c * AtomicCmpxchg, AtomicWait, AtomicWake
* Use 'BinaryenGlobalRef' instead of 'BinaryenImportRef' for globals in ↵Daniel Wirtz2017-11-071-1/+3
| | | | binaryen-c (#1270)
* Added the ability to run specific optimization passes to binaryen-c/.js (#1252)Daniel Wirtz2017-10-301-0/+3
|
* Add missing prototypes for globals in binaryen-c.h (#1183)Sergey Pepyakin2017-09-131-0/+6
| | | | | | * Add missing prototypes for globals in binaryen-c.h * Use int8_t for mutable_
* Initial asm.js output for binaryen-c / binaryen.js (#1136)Daniel Wirtz2017-08-241-1/+4
| | | | * 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-0/+3
| | | | | | * add docs and error hints when a Call should be a CallImport * fix binaryen API docs in docs/
* S-expression parsing in C API and binaryen.js (#1050)Alon Zakai2017-06-131-0/+3
| | | | | | * 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-2/+22
| | | 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.
* Make header guards consistent (#997)Sam Clegg2017-05-041-3/+3
|
* New binaryen.js (#922)Alon Zakai2017-03-241-1/+1
| | | 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.
* import kindsAlon Zakai2016-09-071-1/+1
|
* loops no longer have an out label and other upstream loop updatesAlon Zakai2016-09-071-2/+1
|
* add drop and tee expressionsAlon Zakai2016-09-071-1/+8
|
* support expressions in segment offsetsAlon Zakai2016-08-121-1/+1
|
* Don't emit empty array literals in trace output (#631)Alon Zakai2016-07-131-1/+1
| | | | * don't emit empty array literals in trace output
* commentAlon Zakai2016-07-121-0/+3
|
* add a tracing option to the c api, which logs out a runnable program from c ↵Alon Zakai2016-07-121-1/+14
| | | | api calls
* clarify the local/var/param distinctionAlon Zakai2016-07-071-1/+12
|