diff options
Diffstat (limited to 'compiler/destroyer.nim')
-rw-r--r-- | compiler/destroyer.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/destroyer.nim b/compiler/destroyer.nim index 3f78cac6c..2a82b6f3b 100644 --- a/compiler/destroyer.nim +++ b/compiler/destroyer.nim @@ -216,6 +216,7 @@ proc isLastRead(n: PNode; c: var Con): bool = let s = n.sym var pcs: seq[int] = @[instr+1] var takenGotos: IntSet + var takenForks = initIntSet() while pcs.len > 0: var pc = pcs.pop @@ -251,7 +252,7 @@ proc isLastRead(n: PNode; c: var Con): bool = inc pc of fork: # we follow the next instruction but push the dest onto our "work" stack: - if not takenGotos.containsOrIncl(pc): + if not takenForks.containsOrIncl(pc): pcs.add pc + c.g[pc].dest inc pc #echo c.graph.config $ n.info, " last read here!" |