diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-08-22 13:56:17 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-08-25 11:12:30 +0100 |
commit | 5b167f5edad7d3268de20452da7af05c38972f7c (patch) | |
tree | 36a14e64b510ede91e4e334f3e44d865321adcde /compiler/codeGen/StgCmmBind.hs | |
parent | 3108accd634a521b25471df19f063c2061d6d3ee (diff) | |
download | haskell-5b167f5edad7d3268de20452da7af05c38972f7c.tar.gz |
Snapshot of codegen refactoring to share with simonpj
Diffstat (limited to 'compiler/codeGen/StgCmmBind.hs')
-rw-r--r-- | compiler/codeGen/StgCmmBind.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs index 2947d33042..ef432ae6d2 100644 --- a/compiler/codeGen/StgCmmBind.hs +++ b/compiler/codeGen/StgCmmBind.hs @@ -31,8 +31,7 @@ import StgCmmForeign (emitPrimCall) import MkGraph import CoreSyn ( AltCon(..) ) import SMRep -import CmmDecl -import CmmExpr +import Cmm import CmmUtils import CLabel import StgSyn @@ -75,7 +74,8 @@ cgTopRhsClosure id ccs _ upd_flag srt args body = do closure_info = mkClosureInfo True id lf_info 0 0 srt_info descr closure_label = mkLocalClosureLabel name (idCafInfo id) cg_id_info = litIdInfo id lf_info (CmmLabel closure_label) - closure_rep = mkStaticClosureFields closure_info ccs True [] + caffy = idCafInfo id + closure_rep = mkStaticClosureFields closure_info ccs caffy [] -- BUILD THE OBJECT, AND GENERATE INFO TABLE (IF NECESSARY) ; emitDataLits closure_label closure_rep @@ -209,7 +209,7 @@ mkRhsClosure bndr cc bi body@(StgCase (StgApp scrutinee [{-no args-}]) _ _ _ _ -- ignore uniq, etc. (AlgAlt _) - [(DataAlt con, params, _use_mask, + [(DataAlt _, params, _use_mask, (StgApp selectee [{-no args-}]))]) | the_fv == scrutinee -- Scrutinee is the only free variable && maybeToBool maybe_offset -- Selectee is a component of the tuple @@ -226,8 +226,8 @@ mkRhsClosure bndr cc bi where lf_info = mkSelectorLFInfo bndr offset_into_int (isUpdatable upd_flag) - (_, params_w_offsets) = layOutDynConstr con (addIdReps params) - -- Just want the layout + (_, _, params_w_offsets) = mkVirtConstrOffsets (addIdReps params) + -- Just want the layout maybe_offset = assocMaybe params_w_offsets (NonVoid selectee) Just the_offset = maybe_offset offset_into_int = the_offset - fixedHdrSize |