diff options
author | Michael D. Adams <t-madams@microsoft.com> | 2007-06-27 15:12:57 +0000 |
---|---|---|
committer | Michael D. Adams <t-madams@microsoft.com> | 2007-06-27 15:12:57 +0000 |
commit | f96e9aa0444de0e673b3c4055c6e43299639bc5b (patch) | |
tree | 7bb999eafe8282492550cd835118a199bff05247 /compiler/codeGen/CgMonad.lhs | |
parent | affbe8dae5d7eb350686b42ddbd4f3561b7bd0ec (diff) | |
download | haskell-f96e9aa0444de0e673b3c4055c6e43299639bc5b.tar.gz |
First pass at implementing info tables for CPS
This is a fairly complete implementation, however
two 'panic's have been placed in the critical path
where the implementation is still a bit lacking so
do not expect it to run quite yet.
One call to panic is because we still need to create
a GC block for procedures that don't have them yet.
(cmm/CmmCPS.hs:continuationToProc)
The other is due to the need to convert from a
ContinuationInfo to a CmmInfo.
(codeGen/CgInfoTbls.hs:emitClosureCodeAndInfoTable)
(codeGen/CgInfoTbls.hs:emitReturnTarget)
Diffstat (limited to 'compiler/codeGen/CgMonad.lhs')
-rw-r--r-- | compiler/codeGen/CgMonad.lhs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/codeGen/CgMonad.lhs b/compiler/codeGen/CgMonad.lhs index ca08e06582..e3c8a77d58 100644 --- a/compiler/codeGen/CgMonad.lhs +++ b/compiler/codeGen/CgMonad.lhs @@ -734,9 +734,9 @@ emitData sect lits where data_block = CmmData sect lits -emitProc :: [CmmLit] -> CLabel -> CmmFormals -> [CmmBasicBlock] -> Code -emitProc lits lbl args blocks - = do { let proc_block = CmmProc (map CmmStaticLit lits) lbl args blocks +emitProc :: CmmInfo -> CLabel -> CmmFormals -> [CmmBasicBlock] -> Code +emitProc info lbl args blocks + = do { let proc_block = CmmProc info lbl args blocks ; state <- getState ; setState $ state { cgs_tops = cgs_tops state `snocOL` proc_block } } @@ -745,7 +745,7 @@ emitSimpleProc :: CLabel -> Code -> Code emitSimpleProc lbl code = do { stmts <- getCgStmts code ; blks <- cgStmtsToBlocks stmts - ; emitProc [] lbl [] blks } + ; emitProc CmmNonInfo lbl [] blks } getCmm :: Code -> FCode Cmm -- Get all the CmmTops (there should be no stmts) |