Introduce finer-grained effects

This commit is contained in:
Nigel Tao committed 2018-07-29 13:40:49 +10:00
1 parent 77e538aec8
commit 0a47966e72
12 files changed
+129 -115

No files matched your search

+2 -1
View File
@@ -30,7 +30,8 @@ func (g *gen) writeExpr(b *buffer, n *a.Expr, rp replacementPolicy, depth uint32
}
depth++
if rp == replaceCallSuspendibles && n.CallSuspendible() {
// XXX: s/Optional/Coroutine/
if rp == replaceCallSuspendibles && n.Effect().RootCause() && n.Effect().Optional() {
if g.currFunk.tempR >= g.currFunk.tempW {
return fmt.Errorf("internal error: temporary variable count out of sync")
}