mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Separate the coro_susp_point from the coro stack
This commit is contained in:
1 parent
2928806ab6
commit
9518af5a95
6 files changed
+292
-317
No files matched your search
@@ -62,8 +62,8 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, depth uint32) error {
|
||||
} else if ident == t.IDCoroutineResumed {
|
||||
if g.currFunk.astFunc.Effect().Coroutine() {
|
||||
// TODO: don't hard-code [0], and allow recursive coroutines.
|
||||
b.printf("(self->private_impl.%s%s[0].coro_susp_point != 0)",
|
||||
cPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
b.printf("(self->private_impl.%s%s[0] != 0)",
|
||||
pPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
} else {
|
||||
b.writes("false")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user