Cope with VoidRep fields in a static constructor.
= returnUs (\xs -> table ++ xs)
where
table = StData PtrRep [StCLbl (infoTableLabelFromCI cl_info)] :
- map do_one_amode amodes
+ foldr do_one_amode [] amodes
- do_one_amode amode
- = StData (promote_to_word (getAmodeRep amode)) [a2stix amode]
+ do_one_amode amode rest
+ | rep == VoidRep = rest
+ | otherwise = StData (promote_to_word rep) [a2stix amode] : rest
+ where
+ rep = getAmodeRep amode
-- We need to promote any item smaller than a word to a word
promote_to_word pk