diff options
author | Isaac Dupree <id@isaac.cedarswampstudios.org> | 2008-01-04 10:53:39 +0000 |
---|---|---|
committer | Isaac Dupree <id@isaac.cedarswampstudios.org> | 2008-01-04 10:53:39 +0000 |
commit | d76b6a05ab36066e8aeb67d58e25992d1ef83a8a (patch) | |
tree | 6a1994b9d1cac97252b4435219b33477cd80e139 /compiler/cmm/CmmLint.hs | |
parent | 84629bd7dc7377a5f1138df7185a0b9771880834 (diff) | |
download | haskell-d76b6a05ab36066e8aeb67d58e25992d1ef83a8a.tar.gz |
change CmmActual, CmmFormal to use a data CmmHinted rather than tuple (#1405)
This allows the instance of UserOfLocalRegs to be within Haskell98, and IMHO
makes the code a little cleaner generally.
This is one small (though tedious) step towards making GHC's code more
portable...
Diffstat (limited to 'compiler/cmm/CmmLint.hs')
-rw-r--r-- | compiler/cmm/CmmLint.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs index b1922d0cac..e376e56d47 100644 --- a/compiler/cmm/CmmLint.hs +++ b/compiler/cmm/CmmLint.hs @@ -137,7 +137,7 @@ lintCmmStmt labels = lint lintCmmExpr r return () lint (CmmCall target _res args _ _) = - lintTarget target >> mapM_ (lintCmmExpr.fst) args + lintTarget target >> mapM_ (lintCmmExpr . hintlessCmm) args lint (CmmCondBranch e id) = checkTarget id >> lintCmmExpr e >> checkCond e lint (CmmSwitch e branches) = do mapM_ checkTarget $ catMaybes branches @@ -145,8 +145,8 @@ lintCmmStmt labels = lint if (erep == wordRep) then return () else cmmLintErr (text "switch scrutinee is not a word: " <> ppr e) - lint (CmmJump e args) = lintCmmExpr e >> mapM_ (lintCmmExpr.fst) args - lint (CmmReturn ress) = mapM_ (lintCmmExpr.fst) ress + lint (CmmJump e args) = lintCmmExpr e >> mapM_ (lintCmmExpr . hintlessCmm) args + lint (CmmReturn ress) = mapM_ (lintCmmExpr . hintlessCmm) ress lint (CmmBranch id) = checkTarget id checkTarget id = if elemBlockSet id labels then return () else cmmLintErr (text "Branch to nonexistent id" <+> ppr id) |