summaryrefslogtreecommitdiff
path: root/src/binaryen-c.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor optimization defaults (#1366)Alon Zakai2018-01-171-24/+14
| | | | | 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-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* runFunction => runOnFunction (we run on the function, not run the function) ↵Alon Zakai2018-01-101-2/+2
| | | | (#1356)
* Add getters for various specific expression fields to C/JS (#1332)Daniel Wirtz2017-12-201-36/+944
|
* Provide AddImport/AddExport for each element in the C-API (#1292)Daniel Wirtz2017-11-221-5/+115
| | | | * 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-0/+60
| | | * Also other function utilities in C and JS APIs
* Add atomic load/store to binaryen-c/.js (#1298)Daniel Wirtz2017-11-201-1/+23
|
* Add const expression utilities to binaryen-c/.js (#1288)Daniel Wirtz2017-11-151-0/+54
|
* Fix yet another BinaryenAddGlobal tracing issue (#1283)Daniel Wirtz2017-11-131-1/+1
| | | Now also includes a test.
* Added expression utility functions to binaryen-c/.js (#1269)Daniel Wirtz2017-11-111-0/+47
|
* Fixed use of undefined 'types' array in BinaryenAddGlobal tracing (#1279)Daniel Wirtz2017-11-101-1/+1
| | | | | | * Fixed use of undefined 'types' array in BinaryenAddGlobal tracing * also fix use of 'expressions'
* Added BinaryenAtomic* incl. ops to binaryen-c (#1276)Daniel Wirtz2017-11-091-1/+47
| | | | | | * Added BinaryenAtomicRMW incl. ops to binaryen-c * AtomicCmpxchg, AtomicWait, AtomicWake
* Use 'BinaryenGlobalRef' instead of 'BinaryenImportRef' for globals in ↵Daniel Wirtz2017-11-071-1/+1
| | | | binaryen-c (#1270)
* Added the ability to run specific optimization passes to binaryen-c/.js (#1252)Daniel Wirtz2017-10-301-0/+21
|
* notation change: AST => IR (#1245)Alon Zakai2017-10-241-1/+1
| | | The IR is indeed a tree, but not an "abstract syntax tree" since there is no language for which it is the syntax (except in the most trivial and meaningless sense).
* Add missing finalize() call to C API for call_indirect (#1184)Sergey Pepyakin2017-09-141-0/+1
|
* Add missing prototypes for globals in binaryen-c.h (#1183)Sergey Pepyakin2017-09-131-2/+2
| | | | | | * 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/+17
| | | | * Added BinaryenModulePrintAsmjs (using wasm2asm) + Module#emitAsmjs JS binding
* refactor and improve break validation. breaks names are unique, so we don't ↵Alon Zakai (kripken)2017-07-111-0/+1
| | | | need a stack, and break targets must exist even if they are not actually taken
* Add atomic loads and stores (#1077)Derek Schuff2017-06-281-2/+2
| | | | | Add IR, wast and binary support for atomic loads and stores. Currently all IR generated by means other than parsing wast and binary files always generates non-atomic accesses, and optimizations have not yet been made aware of atomics, so they are certainly not ready to be used yet.
* S-expression parsing in C API and binaryen.js (#1050)Alon Zakai2017-06-131-0/+18
| | | | | | * add C API and binaryen.js support for parsing s-expressions * update js builds and tests
* C API fixes (#1042)Alon Zakai2017-06-071-16/+17
| | | | | | * fix mutex usage in C API, and some minor cleanup around it too * update testcase that was forgotten to be updated before
* Update binaryen-c/binaryen.js, fixes #1028, fixes #1029 (#1030)Daniel Wirtz2017-06-071-4/+102
| | | 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-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.
* clean up raw pointer import->functionType, make it a Name like everything ↵Alon Zakai2017-02-171-1/+1
| | | | else (#915)
* Merge pull request #871 from WebAssembly/fix-c-api-unused-memAlon Zakai2017-01-051-0/+1
|\ | | | | Mark memory as existing when it is created in the C API
| * mark memory as existing when it is created in the C APIAlon Zakai (kripken)2017-01-041-0/+1
| |
* | Print long string in one call (#864)Loo Rong Jie2017-01-031-11/+11
|/
* More binary updates for 0xc (#733)Derek Schuff2016-10-031-0/+1
| | | | | | | | | | | | | | | Refine tables to explicitly exist or not. Previously they were printed or encoded if it had any segments, or an initial or max size. However tables can be defined but empty, so we had a special hack that defined an empty segment when we really just wanted an empty table. Now, just make the existence explicit. Update Function table encoding for 0xc (Table and Element sections) Add end opcodes after function bodies (these are consumed by getMaybeBlock with the same behavior that it had before when it reached the function end, so no explicit decode) Update call_indirect encoding for 0xc (no arity, call target is last)
* Refactor Import::Kind and Export::Kind into an ExternalKind enum class (#725)Alon Zakai2016-10-031-2/+2
|
* refactor wasm.h to remove numericIndex hacks, and move indexing to the parsersAlon Zakai2016-09-211-0/+1
|
* import type for globalsAlon Zakai2016-09-071-1/+1
|
* import kindsAlon Zakai2016-09-071-0/+1
|
* export kindsAlon Zakai2016-09-071-1/+7
|
* loops no longer have an out label and other upstream loop updatesAlon Zakai2016-09-071-6/+3
|
* add drop and tee expressionsAlon Zakai2016-09-071-2/+41
|
* offset support in tableAlon Zakai2016-08-151-2/+4
|
* support function table initial and max sizes, and new printing formatAlon Zakai2016-08-121-0/+1
|
* support expressions in segment offsetsAlon Zakai2016-08-121-4/+4
|
* Don't emit empty array literals in trace output (#631)Alon Zakai2016-07-131-6/+18
| | | | * don't emit empty array literals in trace output
* relooper tracing + fixesAlon Zakai2016-07-121-49/+40
|
* allow multiple tracesAlon Zakai2016-07-121-15/+24
|
* add a tracing option to the c api, which logs out a runnable program from c ↵Alon Zakai2016-07-121-13/+425
| | | | api calls
* clarify the local/var/param distinctionAlon Zakai2016-07-071-3/+3
|
* Relooper switch support (#617)Alon Zakai2016-07-021-2/+6
| | | | | | * support switches in relooper and c api * update relooper fuzzer for switches
* make creating functions and types parallelizable in c api (#603)Alon Zakai2016-06-261-2/+20
|
* add c api method to interpret a module, calling its start method (#601)Alon Zakai2016-06-251-0/+8
|
* add BinaryenExpressionPrint to c api (#599)Alon Zakai2016-06-241-0/+5
|
* make call_indirect type a name, so that it is not a dependency on the ↵Alon Zakai2016-06-031-4/+5
| | | | module, which would break consistency and make some parallel passes tricky (#568)
* Added static_cast to prevent direct conversion from subclasses to void*. (#502)MI3Guy2016-05-191-20/+20
|