mirror of
https://github.com/nim-lang/Nim.git
synced 2026-09-09 06:55:40 +00:00
dec inLoop after exiting the while scope in computeLiveRanges [backport] (#19918)
* dec inLoop after exiting the while scope in computeLiveRanges * add testcase
This commit is contained in:
@@ -851,7 +851,7 @@ proc computeLiveRanges(c: var Partitions; n: PNode) =
|
||||
# connect(graph, cursorVar)
|
||||
inc c.inLoop
|
||||
for child in n: computeLiveRanges(c, child)
|
||||
inc c.inLoop
|
||||
dec c.inLoop
|
||||
of nkElifBranch, nkElifExpr, nkElse, nkOfBranch:
|
||||
inc c.inConditional
|
||||
for child in n: computeLiveRanges(c, child)
|
||||
|
||||
Reference in New Issue
Block a user