projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug relating to the return values of prim ops
[ghc-hetmet.git]
/
compiler
/
codeGen
/
CgInfoTbls.hs
diff --git
a/compiler/codeGen/CgInfoTbls.hs
b/compiler/codeGen/CgInfoTbls.hs
index
4ba4061
..
d3b54a2
100644
(file)
--- a/
compiler/codeGen/CgInfoTbls.hs
+++ b/
compiler/codeGen/CgInfoTbls.hs
@@
-43,18
+43,10
@@
import Name
import DataCon
import Unique
import StaticFlags
import DataCon
import Unique
import StaticFlags
-import FastString
-import Packages
-import Module
import Maybes
import Constants
import Maybes
import Constants
-import Outputable
-
-import Data.Char
-import Data.Word
-
-------------------------------------------------------------------------
--
-- Generating the info table and code for a closure
-------------------------------------------------------------------------
--
-- Generating the info table and code for a closure
@@
-78,15
+70,17
@@
import Data.Word
--
-- See includes/InfoTables.h
--
-- See includes/InfoTables.h
-emitClosureCodeAndInfoTable :: ClosureInfo -> [LocalReg] -> CgStmts -> Code
+emitClosureCodeAndInfoTable :: ClosureInfo -> CmmFormals -> CgStmts -> Code
emitClosureCodeAndInfoTable cl_info args body
= do { ty_descr_lit <-
if opt_SccProfilingOn
emitClosureCodeAndInfoTable cl_info args body
= do { ty_descr_lit <-
if opt_SccProfilingOn
- then mkStringCLit (closureTypeDescr cl_info)
+ then do lit <- mkStringCLit (closureTypeDescr cl_info)
+ return (makeRelativeRefTo info_lbl lit)
else return (mkIntCLit 0)
; cl_descr_lit <-
if opt_SccProfilingOn
else return (mkIntCLit 0)
; cl_descr_lit <-
if opt_SccProfilingOn
- then mkStringCLit cl_descr_string
+ then do lit <- mkStringCLit cl_descr_string
+ return (makeRelativeRefTo info_lbl lit)
else return (mkIntCLit 0)
; let std_info = mkStdInfoTable ty_descr_lit cl_descr_lit
cl_type srt_len layout_lit
else return (mkIntCLit 0)
; let std_info = mkStdInfoTable ty_descr_lit cl_descr_lit
cl_type srt_len layout_lit
@@
-402,7
+396,7
@@
emitInfoTableAndCode
:: CLabel -- Label of info table
-> [CmmLit] -- ...its invariant part
-> [CmmLit] -- ...and its variant part
:: CLabel -- Label of info table
-> [CmmLit] -- ...its invariant part
-> [CmmLit] -- ...and its variant part
- -> [LocalReg] -- ...args
+ -> CmmFormals -- ...args
-> [CmmBasicBlock] -- ...and body
-> Code
-> [CmmBasicBlock] -- ...and body
-> Code