projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f770022
)
Eliminated use of 'fromJust' from the CPS pass
author
Michael D. Adams
<t-madams@microsoft.com>
Thu, 5 Jul 2007 17:06:37 +0000
(17:06 +0000)
committer
Michael D. Adams
<t-madams@microsoft.com>
Thu, 5 Jul 2007 17:06:37 +0000
(17:06 +0000)
compiler/cmm/CmmCPSGen.hs
patch
|
blob
|
history
diff --git
a/compiler/cmm/CmmCPSGen.hs
b/compiler/cmm/CmmCPSGen.hs
index
c78525e
..
abea84f
100644
(file)
--- a/
compiler/cmm/CmmCPSGen.hs
+++ b/
compiler/cmm/CmmCPSGen.hs
@@
-385,7
+385,6
@@
pack_continuation allow_header_set
(ContinuationFormat _ cont_id cont_frame_size live_regs)
= pack_frame curr_frame_size cont_frame_size maybe_header continuation_args
where
(ContinuationFormat _ cont_id cont_frame_size live_regs)
= pack_frame curr_frame_size cont_frame_size maybe_header continuation_args
where
- continuation_function = CmmLit $ CmmLabel $ fromJust cont_id
continuation_args = map (maybe Nothing (Just . CmmReg . CmmLocal))
live_regs
needs_header_set =
continuation_args = map (maybe Nothing (Just . CmmReg . CmmLocal))
live_regs
needs_header_set =
@@
-394,7
+393,7
@@
pack_continuation allow_header_set
_ -> isJust cont_id
maybe_header = if allow_header_set && needs_header_set
_ -> isJust cont_id
maybe_header = if allow_header_set && needs_header_set
- then Just continuation_function
+ then maybe Nothing (Just . CmmLit . CmmLabel) cont_id
else Nothing
pack_frame :: WordOff -- ^ Current frame size
else Nothing
pack_frame :: WordOff -- ^ Current frame size