Commit 7163be78 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Convert some DEBUG uses to debugIsOn

parent 71847273
...@@ -45,6 +45,7 @@ import Util ...@@ -45,6 +45,7 @@ import Util
import Maybes import Maybes
import Outputable import Outputable
import FastTypes import FastTypes
import StaticFlags
\end{code} \end{code}
...@@ -130,16 +131,12 @@ uniqAway' (InScope set n) var ...@@ -130,16 +131,12 @@ uniqAway' (InScope set n) var
where where
orig_unique = getUnique var orig_unique = getUnique var
try k try k
#ifdef DEBUG | debugIsOn && (k ># _ILIT(1000))
| k ># _ILIT(1000)
= pprPanic "uniqAway loop:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n)) = pprPanic "uniqAway loop:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n))
#endif
| uniq `elemVarSetByKey` set = try (k +# _ILIT(1)) | uniq `elemVarSetByKey` set = try (k +# _ILIT(1))
#ifdef DEBUG | debugIsOn && opt_PprStyle_Debug && (k ># _ILIT(3))
| opt_PprStyle_Debug && k ># _ILIT(3)
= pprTrace "uniqAway:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n)) = pprTrace "uniqAway:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n))
setVarUnique var uniq setVarUnique var uniq
#endif
| otherwise = setVarUnique var uniq | otherwise = setVarUnique var uniq
where where
uniq = deriveUnique orig_unique (iBox (n *# k)) uniq = deriveUnique orig_unique (iBox (n *# k))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment