mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 09:01:35 +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
@@ -593,7 +593,7 @@ func (g *gen) writeBuiltinQuestionCall(b *buffer, n *a.Expr, depth uint32) error
|
||||
g.currFunk.usesScratch = true
|
||||
// TODO: don't hard-code [0], and allow recursive coroutines.
|
||||
scratchName := fmt.Sprintf("self->private_impl.%s%s[0].scratch",
|
||||
cPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
sPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
|
||||
b.printf("%s = ", scratchName)
|
||||
if err := g.writeExpr(b, x, depth); err != nil {
|
||||
@@ -667,7 +667,7 @@ func (g *gen) writeReadUxxAsUyy(b *buffer, n *a.Expr, preName string, xx uint8,
|
||||
g.currFunk.usesScratch = true
|
||||
// TODO: don't hard-code [0], and allow recursive coroutines.
|
||||
scratchName := fmt.Sprintf("self->private_impl.%s%s[0].scratch",
|
||||
cPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
sPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
|
||||
b.printf("if (WUFFS_BASE__LIKELY(io1_a_src - iop_a_src >= %d)) {", xx/8)
|
||||
b.printf("%s%d =", tPrefix, temp)
|
||||
|
||||
Reference in new issue
Block a user