mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
Don't over-generate temporary variables.
This commit is contained in:
1 parent
d059fff2ae
commit
540274b57d
1 file changed
+6
-6
@@ -960,14 +960,14 @@ func (g *gen) writeCallSuspendibles(n *a.Expr, depth uint32) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if g.perFunc.tempW > maxTemp {
|
||||
return fmt.Errorf("too many temporary variables required")
|
||||
}
|
||||
temp := g.perFunc.tempW
|
||||
g.perFunc.tempW++
|
||||
|
||||
// TODO: delete these hacks that only matches "in.src.read_u8?()" etc.
|
||||
if isInSrcReadU8(g.tm, n) {
|
||||
if g.perFunc.tempW > maxTemp {
|
||||
return fmt.Errorf("too many temporary variables required")
|
||||
}
|
||||
temp := g.perFunc.tempW
|
||||
g.perFunc.tempW++
|
||||
|
||||
// TODO: suspend coroutine state.
|
||||
g.printf("if (%ssrc->ri >= %ssrc->wi) { status = "+
|
||||
"%ssrc->closed ? puffs_%s_error_unexpected_eof : puffs_%s_status_short_read;",
|
||||
|
||||
Reference in new issue
Block a user