diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-20 00:43:34 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-09-20 00:43:34 +0100 |
commit | 05a0a6474338af410a90296cff9dfea50773f4ca (patch) | |
tree | c8cb62304dc204ca6e8ae8d22fb5d05c562a342b /compiler/codeGen | |
parent | aa6bc700cc07e21a8b6aa5816a8c63201b9b260e (diff) | |
download | haskell-05a0a6474338af410a90296cff9dfea50773f4ca.tar.gz |
Change some "else return ()"s to use when/unless
Diffstat (limited to 'compiler/codeGen')
-rw-r--r-- | compiler/codeGen/StgCmmBind.hs | 3 | ||||
-rw-r--r-- | compiler/codeGen/StgCmmLayout.hs | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs index 02d3d0246f..89d27dd161 100644 --- a/compiler/codeGen/StgCmmBind.hs +++ b/compiler/codeGen/StgCmmBind.hs @@ -468,8 +468,7 @@ closureCodeBody top_lvl bndr cl_info cc args arity body fv_details { fv_bindings <- mapM bind_fv fv_details -- Load free vars out of closure *after* -- heap check, to reduce live vars over check - ; if node_points then load_fvs node lf_info fv_bindings - else return () + ; when node_points $ load_fvs node lf_info fv_bindings ; void $ cgExpr body }} } diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs index 69a0d1a0cf..fa80edc96c 100644 --- a/compiler/codeGen/StgCmmLayout.hs +++ b/compiler/codeGen/StgCmmLayout.hs @@ -61,6 +61,7 @@ import Util import Data.List import Outputable import FastString +import Control.Monad ------------------------------------------------------------------------ -- Call and return sequences @@ -86,7 +87,7 @@ emitReturn results do { adjustHpBackwards ; emit (mkReturnSimple dflags results updfr_off) } AssignTo regs adjust -> - do { if adjust then adjustHpBackwards else return () + do { when adjust adjustHpBackwards ; emitMultiAssign regs results } ; return AssignedDirectly } |