summaryrefslogtreecommitdiff
path: root/test/example
Commit message (Collapse)AuthorAgeFilesLines
* Also clear imports and exports maps in BinaryenModuleDispose (#1372)Daniel Wirtz2018-01-191-1/+1
| | | | | | fixes #1369 * Update binaries and kitchen-sink test
* Refactor optimization defaults (#1366)Alon Zakai2018-01-171-1/+16
| | | | | 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-172-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-103-12/+0
| | | 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.
* Add getters for various specific expression fields to C/JS (#1332)Daniel Wirtz2017-12-207-190/+200
|
* Provide AddImport/AddExport for each element in the C-API (#1292)Daniel Wirtz2017-11-226-27/+27
| | | | * Provide AddImport/AddExport for each element in the C-API
* Update call_indirect text syntax to match spec update (#1281)Derek Schuff2017-11-132-4/+4
| | | | Function type gets its own element rather than being a part of the call_indirect (see WebAssembly/spec#599)
* Fix yet another BinaryenAddGlobal tracing issue (#1283)Daniel Wirtz2017-11-133-4/+19
| | | Now also includes a test.
* Emit binary function index in comment in text format, for convenience (#1232)Alon Zakai2017-10-206-69/+69
|
* Expressions should not appear twice in the ast (#1191)Alon Zakai2017-09-182-245/+279
|
* Add missing finalize() call to C API for call_indirect (#1184)Sergey Pepyakin2017-09-142-0/+24
|
* Avoid new blocks in binary reading/writing (#1165)Alon Zakai2017-09-121-31/+27
| | | | | | * don't emit a toplevel block if we don't need to, as in wasm it is a list context * don't create unnecessary blocks in wasm reading
* Ignore unreachable code in wasm binaries (#1122)Alon Zakai2017-08-221-11/+0
| | | Ignoring unreachable code in wasm binaries lets us avoid corner cases with unstructured code in wasm binaries that is a poor fit for Binaryen's structured IR.
* Emit optimal-size LEBs in section/subsection/function body sizes (#1128)Alon Zakai2017-08-151-1/+1
| | | | * emit optimal-size LEBs in section/subsection/function body sizes, instead of preallocating 5 bytes
* Support new result syntax for if/loop/block (#1047)Sam Clegg2017-06-122-12/+12
| | | | | | Support both syntax formats in input since the old spec tests still need to be parsable.
* Optimize/merge duplicate function types (#1041)Alon Zakai2017-06-122-9/+0
|
* Update binaryen-c/binaryen.js, fixes #1028, fixes #1029 (#1030)Daniel Wirtz2017-06-076-76/+88
| | | 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.
* relooper improvementsAlon Zakai (kripken)2017-05-201-0/+3
|
* merge blocks before and after remove-unused-brsAlon Zakai (kripken)2017-05-101-10/+12
|
* Extensible name section (#933)pipcet2017-04-131-1/+1
| | | | | | | | | | | | | See https://github.com/WebAssembly/binaryen/issues/914. * extensible name section support: read function names, too * c-api-unused-mem.txt: change expected size to match new name section * * check subsection size matches * print warning for unknown name subsections (including the local section)
* New binaryen.js (#922)Alon Zakai2017-03-242-2/+2
| | | 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.
* finalize interim ifs in relooper, and other if handling issues (#940)Alon Zakai2017-03-132-0/+557
|
* use a single space for pretty printing of wasts, so massive wasts are less ↵Alon Zakai2017-03-096-3914/+3914
| | | | unruly (#928)
* Fix emitting of unreachable block/if/loop (#911)Alon Zakai2017-02-161-1/+13
| | | | | | | | | | | | | | | | | | | | | | * an unreachable block is one with an unreachable child, plus no breaks * document new difference between binaryen IR and wasm * fix relooper missing finalize * add a bunch of tests * don't assume that test/*.wast files print to themselves exactly; print to from.wast. this allows wast tests with comments in them * emit unreachable blocks as (block .. unreachable) unreachable * if without else and unreachable ifTrue is still not unreachable, it should be none * update wasm.js * cleanups * empty blocks have none type
* mark memory as existing when it is created in the C APIAlon Zakai (kripken)2017-01-042-0/+194
|
* add a RemoveUnusedModuleElements pass, and make LegalizeJSInterface create ↵Alon Zakai2016-12-072-3/+0
| | | | TempRet0 if needed (otherwise we might remove it before we use it)
* run remove-unused-functions by defaultAlon Zakai2016-10-142-447/+0
|
* Change print order of top-level module components (#751)Derek Schuff2016-10-075-34/+34
| | | | | | | | In wast files, the spec and WABT require imports to appear before any non-import definitions (see also https://github.com/WebAssembly/wabt/issues/152). This patch re-orders visitModule in the wast printer to meet this requirement, and more or less match the order of the binary sections. Also remove extraneous whitespace around table definitions.
* Require unique names in binaryen IR (#746)Alon Zakai2016-10-061-1/+1
|
* Print the name of memory along with size (#720)Derek Schuff2016-09-285-17/+17
| | | | | Otherwise when we export it as "$0" it's an undefined name. The spec interpreter actually rejects this, although I think it's intended to work, given the tests in export.wast. wabt also accepts it.
* Update binary encoding for block, loop, and if signatures (#711)Derek Schuff2016-09-272-6/+6
| | | | | | Also updates the tests and has a few other changes for binary 0xc: Update nop/unrechable opcodes Fix for "name" section
* optimize if(const)Alon Zakai2016-09-242-120/+24
|
* precompute void expressions tooAlon Zakai2016-09-242-60/+0
|
* autoDrop fixAlon Zakai2016-09-232-9/+15
|
* br_if returns its valueAlon Zakai2016-09-162-9/+15
|
* block signaturesAlon Zakai2016-09-162-6/+6
|
* call_import changes: no more call_import, shared index space with functionsAlon Zakai2016-09-164-256/+256
|
* optimize if-else to br_if when in a blockAlon Zakai2016-09-103-46/+40
|
* autodrop if body if no elseAlon Zakai2016-09-072-3/+9
|
* use eqz as an optimizationAlon Zakai2016-09-072-43/+25
|
* new validation checks for upcoming spec testsAlon Zakai2016-09-073-5/+5
|
* new export syntax in spec repoAlon Zakai2016-09-074-10/+10
|
* new import syntax in spec repoAlon Zakai2016-09-074-14/+14
|
* export kindsAlon Zakai2016-09-074-7/+7
|
* update testsAlon Zakai2016-09-071-4/+4
|
* loops no longer have an out label and other upstream loop updatesAlon Zakai2016-09-073-149/+143
|
* call_indirect now has the target at the endAlon Zakai2016-09-072-3/+3
|
* add drop and tee expressionsAlon Zakai2016-09-077-1294/+1919
|
* offset support in tableAlon Zakai2016-08-152-3/+3
|
* support function table initial and max sizes, and new printing formatAlon Zakai2016-08-122-3/+6
|