diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-18 20:44:20 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-09-18 20:44:20 +0100 |
commit | 3a4c64c1a2953bbc759a6f5c99dad31ab50dc96b (patch) | |
tree | 6cc936273ae8993b1ab970c1e4e5f623cfd93920 /compiler/codeGen/ClosureInfo.lhs | |
parent | 8244ec3416d6db22444e157731deb4d7b5e13824 (diff) | |
download | haskell-3a4c64c1a2953bbc759a6f5c99dad31ab50dc96b.tar.gz |
Make StgHalfWord a portable type
It's now a newtyped Integer. Perhaps a newtyped Word32 would make more
sense, though.
Diffstat (limited to 'compiler/codeGen/ClosureInfo.lhs')
-rw-r--r-- | compiler/codeGen/ClosureInfo.lhs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs index 7a72a00602..f06ee7840c 100644 --- a/compiler/codeGen/ClosureInfo.lhs +++ b/compiler/codeGen/ClosureInfo.lhs @@ -480,7 +480,7 @@ mkClosureInfo dflags is_static id lf_info tot_wds ptr_wds srt_info descr -- anything else gets eta expanded. where name = idName id - sm_rep = mkHeapRep dflags is_static ptr_wds nonptr_wds (lfClosureType lf_info) + sm_rep = mkHeapRep dflags is_static ptr_wds nonptr_wds (lfClosureType dflags lf_info) nonptr_wds = tot_wds - ptr_wds mkConInfo :: DynFlags @@ -492,7 +492,7 @@ mkConInfo dflags is_static data_con tot_wds ptr_wds = ConInfo { closureSMRep = sm_rep, closureCon = data_con } where - sm_rep = mkHeapRep dflags is_static ptr_wds nonptr_wds (lfClosureType lf_info) + sm_rep = mkHeapRep dflags is_static ptr_wds nonptr_wds (lfClosureType dflags lf_info) lf_info = mkConLFInfo data_con nonptr_wds = tot_wds - ptr_wds \end{code} @@ -526,12 +526,12 @@ closureNeedsUpdSpace cl_info = closureUpdReqd cl_info %************************************************************************ \begin{code} -lfClosureType :: LambdaFormInfo -> ClosureTypeInfo -lfClosureType (LFReEntrant _ arity _ argd) = Fun (fromIntegral arity) argd -lfClosureType (LFCon con) = Constr (fromIntegral (dataConTagZ con)) - (dataConIdentity con) -lfClosureType (LFThunk _ _ _ is_sel _) = thunkClosureType is_sel -lfClosureType _ = panic "lfClosureType" +lfClosureType :: DynFlags -> LambdaFormInfo -> ClosureTypeInfo +lfClosureType dflags (LFReEntrant _ arity _ argd) = Fun (toStgHalfWord dflags (toInteger arity)) argd +lfClosureType dflags (LFCon con) = Constr (toStgHalfWord dflags (toInteger (dataConTagZ con))) + (dataConIdentity con) +lfClosureType _ (LFThunk _ _ _ is_sel _) = thunkClosureType is_sel +lfClosureType _ _ = panic "lfClosureType" thunkClosureType :: StandardFormInfo -> ClosureTypeInfo thunkClosureType (SelectorThunk off) = ThunkSelector (fromIntegral off) |