projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch more uniqFromSupply+splitUniqSupply's to takeUniqFromSupply
[ghc-hetmet.git]
/
compiler
/
nativeGen
/
RegAlloc
/
Graph
/
Spill.hs
diff --git
a/compiler/nativeGen/RegAlloc/Graph/Spill.hs
b/compiler/nativeGen/RegAlloc/Graph/Spill.hs
index
2ce028f
..
7e744e6
100644
(file)
--- a/
compiler/nativeGen/RegAlloc/Graph/Spill.hs
+++ b/
compiler/nativeGen/RegAlloc/Graph/Spill.hs
@@
-293,10
+293,9
@@
type SpillM a = State SpillS a
newUnique :: SpillM Unique
newUnique
= do us <- gets stateUS
newUnique :: SpillM Unique
newUnique
= do us <- gets stateUS
- case splitUniqSupply us of
- (us1, us2)
- -> do let uniq = uniqFromSupply us1
- modify $ \s -> s { stateUS = us2 }
+ case takeUniqFromSupply us of
+ (uniq, us')
+ -> do modify $ \s -> s { stateUS = us' }
return uniq
accSpillSL (r1, s1, l1) (_, s2, l2)
return uniq
accSpillSL (r1, s1, l1) (_, s2, l2)