diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-14 16:27:51 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-09-14 16:27:51 +0100 |
commit | a22a9c217ec28e7ade94c589e894b87e144a7fed (patch) | |
tree | 43a22c92e82f931105b028019c65c90225a6f8d7 /compiler/codeGen/CgHeapery.lhs | |
parent | b7dd4b5dbb658d7785f9a28c566be751173a2680 (diff) | |
download | haskell-a22a9c217ec28e7ade94c589e894b87e144a7fed.tar.gz |
Move more constants to platformConstants
Diffstat (limited to 'compiler/codeGen/CgHeapery.lhs')
-rw-r--r-- | compiler/codeGen/CgHeapery.lhs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/compiler/codeGen/CgHeapery.lhs b/compiler/codeGen/CgHeapery.lhs index e37783cf11..f3cb7796f4 100644 --- a/compiler/codeGen/CgHeapery.lhs +++ b/compiler/codeGen/CgHeapery.lhs @@ -452,20 +452,18 @@ do_checks :: WordOff -- Stack headroom -> Code do_checks 0 0 _ _ _ = nopC -do_checks _ hp _ _ _ - | hp > bLOCKS_PER_MBLOCK * bLOCK_SIZE_W - = sorry (unlines [ - "Trying to allocate more than " ++ show (bLOCKS_PER_MBLOCK * bLOCK_SIZE) ++ " bytes.", - "", - "See: http://hackage.haskell.org/trac/ghc/ticket/4505", - "Suggestion: read data from a file instead of having large static data", - "structures in the code."]) - do_checks stk hp reg_save_code rts_lbl live = do dflags <- getDynFlags - do_checks' (mkIntExpr dflags (stk*wORD_SIZE)) - (mkIntExpr dflags (hp*wORD_SIZE)) - (stk /= 0) (hp /= 0) reg_save_code rts_lbl live + if hp > bLOCKS_PER_MBLOCK dflags * bLOCK_SIZE_W dflags + then sorry (unlines [ + "Trying to allocate more than " ++ show (bLOCKS_PER_MBLOCK dflags * bLOCK_SIZE dflags) ++ " bytes.", + "", + "See: http://hackage.haskell.org/trac/ghc/ticket/4505", + "Suggestion: read data from a file instead of having large static data", + "structures in the code."]) + else do_checks' (mkIntExpr dflags (stk * wORD_SIZE)) + (mkIntExpr dflags (hp * wORD_SIZE)) + (stk /= 0) (hp /= 0) reg_save_code rts_lbl live -- The offsets are now in *bytes* do_checks' :: CmmExpr -> CmmExpr -> Bool -> Bool -> CmmStmts -> CmmExpr |