Skip to content
Snippets Groups Projects
Commit 9bef49b8 authored by Julian Seward's avatar Julian Seward
Browse files

[project @ 2000-01-25 16:57:40 by sewardj]

genCodeInfoTable: put tag value into srt_len field for constr info tables.
parent 26b1c3ba
No related merge requests found
...@@ -14,7 +14,7 @@ import StgSyn ( SRT(..) ) ...@@ -14,7 +14,7 @@ import StgSyn ( SRT(..) )
import ClosureInfo ( closurePtrsSize, import ClosureInfo ( closurePtrsSize,
closureNonHdrSize, closureSMRep, closureNonHdrSize, closureSMRep,
infoTableLabelFromCI, infoTableLabelFromCI,
infoTblNeedsSRT, getSRTInfo infoTblNeedsSRT, getSRTInfo, closureSemiTag
) )
import PrimRep ( PrimRep(..) ) import PrimRep ( PrimRep(..) )
import SMRep ( SMRep(..), getSMRepClosureTypeInt ) import SMRep ( SMRep(..), getSMRepClosureTypeInt )
...@@ -22,6 +22,7 @@ import Stix -- all of it ...@@ -22,6 +22,7 @@ import Stix -- all of it
import UniqSupply ( returnUs, UniqSM ) import UniqSupply ( returnUs, UniqSM )
import Outputable ( int ) import Outputable ( int )
import BitSet ( intBS ) import BitSet ( intBS )
import Maybes ( maybeToBool )
import Bits import Bits
import Word import Word
...@@ -68,6 +69,8 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr) ...@@ -68,6 +69,8 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr)
srt = getSRTInfo cl_info srt = getSRTInfo cl_info
(srt_label,srt_len) (srt_label,srt_len)
| is_constr
= (StInt 0, tag)
| needs_srt | needs_srt
= case srt of = case srt of
(lbl, SRT off len) -> (lbl, SRT off len) ->
...@@ -76,6 +79,10 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr) ...@@ -76,6 +79,10 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr)
| otherwise | otherwise
= (StInt 0, 0) = (StInt 0, 0)
maybe_tag = closureSemiTag cl_info
is_constr = maybeToBool maybe_tag
(Just tag) = maybe_tag
layout_info :: Word32 layout_info :: Word32
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
layout_info = (fromInt ptrs `shiftL` 16) .|. fromInt nptrs layout_info = (fromInt ptrs `shiftL` 16) .|. fromInt nptrs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment