diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-05-09 10:38:34 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-05-09 10:38:34 +0000 |
commit | 9c54ee0c9e25617b2a9ad4cdd9d3a6354e2edc0f (patch) | |
tree | 7d1d0cb3da9beb01579d2208094754c6e331c351 /compiler/codeGen | |
parent | ab13303c49618c6224d7c5b5397ac9a98d2e5b6f (diff) | |
download | haskell-9c54ee0c9e25617b2a9ad4cdd9d3a6354e2edc0f.tar.gz |
Store the constructor name in the info table in UTF-8
Diffstat (limited to 'compiler/codeGen')
-rw-r--r-- | compiler/codeGen/CgInfoTbls.hs | 11 | ||||
-rw-r--r-- | compiler/codeGen/CgUtils.hs | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs index 0d6925b78f..4ba406117b 100644 --- a/compiler/codeGen/CgInfoTbls.hs +++ b/compiler/codeGen/CgInfoTbls.hs @@ -43,12 +43,18 @@ import Name import DataCon import Unique import StaticFlags +import FastString +import Packages +import Module import Maybes import Constants import Outputable +import Data.Char +import Data.Word + ------------------------------------------------------------------------- -- -- Generating the info table and code for a closure @@ -89,7 +95,7 @@ emitClosureCodeAndInfoTable cl_info args body ; conName <- if is_con - then do cstr <- mkStringCLit $ fromJust conIdentity + then do cstr <- mkByteStringCLit $ fromJust conIdentity return (makeRelativeRefTo info_lbl cstr) else return (mkIntCLit 0) @@ -111,7 +117,8 @@ emitClosureCodeAndInfoTable cl_info args body Just con -> -- Constructors don't have an SRT -- We keep the *zero-indexed* tag in the srt_len -- field of the info table. - (mkIntCLit 0, fromIntegral (dataConTagZ con), Just $ dataConIdentity con) + (mkIntCLit 0, fromIntegral (dataConTagZ con), + Just $ dataConIdentity con) Nothing -> -- Not a constructor let (label, len) = srtLabelAndLength srt info_lbl diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index 804aeabd13..0e8d6c8ce6 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -26,7 +26,7 @@ module CgUtils ( addToMem, addToMemE, mkWordCLit, - mkStringCLit, + mkStringCLit, mkByteStringCLit, packHalfWordsCLit, blankWord ) where |