diff options
author | Michael D. Adams <t-madams@microsoft.com> | 2007-05-22 15:20:08 +0000 |
---|---|---|
committer | Michael D. Adams <t-madams@microsoft.com> | 2007-05-22 15:20:08 +0000 |
commit | 418175d3c36ca51495d9dfb085fb01711e4c38f9 (patch) | |
tree | 24feb6d2c8a75e36b82081be8073454c2f5161a9 /compiler/codeGen | |
parent | 77cc133da7af6961add020cab1ba9eadee3a0b67 (diff) | |
download | haskell-418175d3c36ca51495d9dfb085fb01711e4c38f9.tar.gz |
Make CmmProc take CmmFormals as argument
Since a CmmCall returns CmmFormals which may include
global registers (and indeed one place in the code
returns the results of a CmmCall into BaseReg) and
since CPS conversion will change those return slots
into formal arguments for the continuation of the call,
CmmProc has to have CmmFormals for the formal arguments.
Oddly, the old code never made use of procedure arguments
so this change only effects the types and not any of the code.
(Because [] is both of type [LocalReg] and CmmFormals.)
Diffstat (limited to 'compiler/codeGen')
-rw-r--r-- | compiler/codeGen/CgInfoTbls.hs | 4 | ||||
-rw-r--r-- | compiler/codeGen/CgMonad.lhs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs index 62a6db2110..d3b54a2f65 100644 --- a/compiler/codeGen/CgInfoTbls.hs +++ b/compiler/codeGen/CgInfoTbls.hs @@ -70,7 +70,7 @@ import Constants -- -- 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 @@ -396,7 +396,7 @@ emitInfoTableAndCode :: CLabel -- Label of info table -> [CmmLit] -- ...its invariant part -> [CmmLit] -- ...and its variant part - -> [LocalReg] -- ...args + -> CmmFormals -- ...args -> [CmmBasicBlock] -- ...and body -> Code diff --git a/compiler/codeGen/CgMonad.lhs b/compiler/codeGen/CgMonad.lhs index 0e4a8a4c73..61b358a6ba 100644 --- a/compiler/codeGen/CgMonad.lhs +++ b/compiler/codeGen/CgMonad.lhs @@ -730,7 +730,7 @@ emitData sect lits where data_block = CmmData sect lits -emitProc :: [CmmLit] -> CLabel -> [LocalReg] -> [CmmBasicBlock] -> Code +emitProc :: [CmmLit] -> CLabel -> CmmFormals -> [CmmBasicBlock] -> Code emitProc lits lbl args blocks = do { let proc_block = CmmProc (map CmmStaticLit lits) lbl args blocks ; state <- getState |