-- This last one is really only for completeness;
-- it isn't actually used for anything interesting
- | LFIndirection
+ {- | LFIndirection -}
data StandardFormInfo -- Tells whether this thunk has one of a small number
-- of standard forms
-> FCode EntryConvention
getEntryConvention id lf_info arg_kinds
- = nodeMustPointToIt lf_info `thenFC` \ node_points ->
- isSwitchSetC ForConcurrent `thenFC` \ is_concurrent ->
+ = nodeMustPointToIt lf_info `thenFC` \ node_points ->
+ isSwitchSetC ForConcurrent `thenFC` \ is_concurrent ->
+ getIntSwitchChkrC `thenFC` \ isw_chkr ->
returnFC (
if (node_points && is_concurrent) then ViaNode else
else
DirectEntry (mkFastEntryLabel id arity) arity arg_regs
where
- (arg_regs, _) = assignRegs live_regs (take arity arg_kinds)
+ (arg_regs, _) = assignRegs isw_chkr live_regs (take arity arg_kinds)
live_regs = if node_points then [node] else []
LFCon con zero_arity
LFLetNoEscape arity _
-> ASSERT(arity == length arg_kinds)
- DirectEntry (mkFastEntryLabel id arity) arity arg_regs
+ DirectEntry (mkStdEntryLabel id) arity arg_regs
where
- (arg_regs, _) = assignRegs live_regs arg_kinds
+ (arg_regs, _) = assignRegs isw_chkr live_regs arg_kinds
live_regs = if node_points then [node] else []
)
= case lf_info of
LFCon data_con _ -> getDataConTag data_con - fIRST_TAG
LFTuple _ _ -> 0
- LFIndirection -> fromInteger iND_TAG
+ --UNUSED: LFIndirection -> fromInteger iND_TAG
_ -> fromInteger oTHER_TAG
\end{code}
-- Ditto for selectors
-}
- other -> if isStaticRep rep
+ other -> {-NO: if isStaticRep rep
then mkStaticInfoTableLabel id
- else mkInfoTableLabel id
+ else -} mkInfoTableLabel id
mkConInfoPtr :: Id -> SMRep -> CLabel
mkConInfoPtr id rep =
LFTuple _ _ -> SLIT("ALLOC_CON")
LFThunk _ _ _ _ -> SLIT("ALLOC_THK")
LFBlackHole -> SLIT("ALLOC_BH")
- LFIndirection -> panic "ALLOC_IND"
+ --UNUSED: LFIndirection -> panic "ALLOC_IND"
LFImported -> panic "ALLOC_IMP"
\end{code}
\begin{code}
-dataConLiveness (MkClosureInfo con _ PhantomRep)
- = case dataReturnConvAlg con of
+dataConLiveness isw_chkr (MkClosureInfo con _ PhantomRep)
+ = case (dataReturnConvAlg isw_chkr con) of
ReturnInRegs regs -> mkLiveRegsBitMask regs
ReturnInHeap -> panic "dataConLiveness:PhantomRep in heap???"
-dataConLiveness _ = mkLiveRegsBitMask [node]
+dataConLiveness _ _ = mkLiveRegsBitMask [node]
\end{code}
%************************************************************************
LFTuple _ _ -> "CON_K"
LFThunk _ _ _ _ -> "THK_K"
LFBlackHole -> "THK_K" -- consider BHs as thunks for the moment... (ToDo?)
- LFIndirection -> panic "IND_KIND"
+ --UNUSED: LFIndirection -> panic "IND_KIND"
LFImported -> panic "IMP_KIND"
closureTypeDescr :: ClosureInfo -> String