summaryrefslogtreecommitdiff
path: root/test/unit/test_bysyncify.py
Commit message (Collapse)AuthorAgeFilesLines
* Bysyncify => Asyncify (#2226)Alon Zakai2019-07-151-29/+0
| | | | | | | After some discussion this seems like a less confusing name: what the pass does is "asyncify" code, after all. The one downside is the name overlaps with the old emscripten "Asyncify" utility, which we'll need to clarify in the docs there. This keeps the old --bysyncify flag around for now, which is helpful for avoiding temporary breakage on CI as we move the emscripten side as well.
* Bysyncify: Assertion improvements (#2193)Alon Zakai2019-07-011-0/+1
| | | | | Add assertions on stack overflow in all 4 Bysyncify API calls (previously only 2 did it). Also add a check that those assertions are hit.
* Bysyncify: Don't instrument functions that call bysyncify_* directly (#2179)Alon Zakai2019-06-211-2/+9
| | | | | Those functions are assumed to be part of the runtime. Instrumenting them would mean nothing can work. With this fix, bysyncify is useful with pure wasm, and not just through imports.
* Bysyncify: bysyncify_stop_unwind (#2173)Alon Zakai2019-06-161-1/+2
| | | Add a method to note the stopping of an unwind. This is enough to implement coroutines. Includes an example of coroutine usage in the test suite.
* Bysyncify: async transform for wasm (#2172)Alon Zakai2019-06-151-0/+20
This adds a new pass, Bysyncify, which transforms code to allow unwind and rewinding the call stack and local state. This allows things like coroutines, turning synchronous code asynchronous, etc. The new pass file itself has a large comment on top with docs. So far the tests here seem to show this works, but this hasn't been tested heavily yet. My next step is to hook this up to emscripten as a replacement for asyncify/emterpreter, see emscripten-core/emscripten#8561 Note that this is completely usable by itself, so it could be useful for any language that needs coroutines etc., and not just ones using LLVM and/or emscripten. See docs on the ABI in the pass source.