Commit Graph

7 Commits

Author SHA1 Message Date
Andrew Kelley
6bade0b825 coroutines: add await early test case 2018-03-01 16:17:38 -05:00
Andrew Kelley
8a0e1d4c02 await keyword works 2018-03-01 15:46:35 -05:00
Andrew Kelley
253d988e7c implementation of await
but it has bugs
2018-03-01 03:28:13 -05:00
Andrew Kelley
834e992a7c add test for coroutine suspend with block 2018-02-28 22:26:26 -05:00
Andrew Kelley
8429d4ceac implement coroutine resume 2018-02-28 22:18:48 -05:00
Andrew Kelley
36eadb569a run coroutine tests only in Debug mode
LLVM 5.0.1, 6.0.0, and trunk crash when attempting to optimize coroutine code.
So, Zig does not support ReleaseFast or ReleaseSafe for coroutines yet.
Luckily, Clang users are running into the same crashes, so folks from the LLVM
community are working on fixes. If we're really lucky they'll be fixed in 6.0.1.
Otherwise we can hope for 7.0.0.
2018-02-28 18:56:26 -05:00
Andrew Kelley
58dc2b719c better coroutine codegen, now passing first coro test
we have to use the Suspend block with llvm.coro.end to
return from the coro
2018-02-28 18:22:43 -05:00