I
think this can be solved if the resulting state machine is willing to accept arbitrary jump statements --including jumps across function boundaries (ie, the compiler would insert a
jump-to-statemachine-exit-L4
code in uses of
await
that are not direct children of the
coroutine
block)