diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-03-05 05:54:08 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-03-05 05:54:08 +0100 |
commit | 9c6b628df643476a515896edb6e54939d1e1e323 (patch) | |
tree | 2df1f0b2fa3026e659ca391d3443e6d3f6a28838 | |
parent | 71fd4acaeb9028c8c4f3e1a7d70adb4677ff88d8 (diff) | |
download | Nim-9c6b628df643476a515896edb6e54939d1e1e323.tar.gz |
DFA: fixes wrong 'def' instruction emission
-rw-r--r-- | compiler/dfa.nim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/dfa.nim b/compiler/dfa.nim index 5eef04148..968b16945 100644 --- a/compiler/dfa.nim +++ b/compiler/dfa.nim @@ -594,11 +594,12 @@ proc genCall(c: var Con; n: PNode) = inc c.inCall for i in 1..<n.len: gen(c, n[i]) - if t != nil and i < t.len and t.sons[i].kind == tyVar: - # XXX This is wrong! Pass by var is a 'might def', not a 'must def' - # like the other defs we emit. This is not good enough for a move - # optimizer. - genDef(c, n[i]) + when false: + if t != nil and i < t.len and t.sons[i].kind == tyVar: + # XXX This is wrong! Pass by var is a 'might def', not a 'must def' + # like the other defs we emit. This is not good enough for a move + # optimizer. + genDef(c, n[i]) # every call can potentially raise: if c.inTryStmt > 0 and canRaise(n[0]): # we generate the instruction sequence: |