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(..) )
import ClosureInfo ( closurePtrsSize,
closureNonHdrSize, closureSMRep,
infoTableLabelFromCI,
infoTblNeedsSRT, getSRTInfo
infoTblNeedsSRT, getSRTInfo, closureSemiTag
)
import PrimRep ( PrimRep(..) )
import SMRep ( SMRep(..), getSMRepClosureTypeInt )
......@@ -22,6 +22,7 @@ import Stix -- all of it
import UniqSupply ( returnUs, UniqSM )
import Outputable ( int )
import BitSet ( intBS )
import Maybes ( maybeToBool )
import Bits
import Word
......@@ -68,6 +69,8 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr)
srt = getSRTInfo cl_info
(srt_label,srt_len)
| is_constr
= (StInt 0, tag)
| needs_srt
= case srt of
(lbl, SRT off len) ->
......@@ -76,6 +79,10 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr)
| otherwise
= (StInt 0, 0)
maybe_tag = closureSemiTag cl_info
is_constr = maybeToBool maybe_tag
(Just tag) = maybe_tag
layout_info :: Word32
#ifdef WORDS_BIGENDIAN
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