summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-14 15:24:30 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-14 15:24:30 +0100
commitf203e63c6ff92bde63a206a58ea63ec082033b8a (patch)
tree0fdb84f953c6195727971d765a025c076fc5e07f /includes
parent6f3be2b6ea39ee28d6cf8da08effb5dd215c92f2 (diff)
downloadhaskell-f203e63c6ff92bde63a206a58ea63ec082033b8a.tar.gz
Move more constants into platformConstants
Diffstat (limited to 'includes')
-rw-r--r--includes/HaskellConstants.hs30
-rw-r--r--includes/mkDerivedConstants.c16
2 files changed, 16 insertions, 30 deletions
diff --git a/includes/HaskellConstants.hs b/includes/HaskellConstants.hs
index 6dc04dc7e1..c9d417349e 100644
--- a/includes/HaskellConstants.hs
+++ b/includes/HaskellConstants.hs
@@ -34,36 +34,6 @@ mAX_CONTEXT_REDUCTION_DEPTH :: Int
mAX_CONTEXT_REDUCTION_DEPTH = 200
-- Increase to 200; see Trac #5395
--- A section of code-generator-related MAGIC CONSTANTS.
-
-mAX_Vanilla_REG :: Int
-mAX_Vanilla_REG = MAX_VANILLA_REG
-
-mAX_Float_REG :: Int
-mAX_Float_REG = MAX_FLOAT_REG
-
-mAX_Double_REG :: Int
-mAX_Double_REG = MAX_DOUBLE_REG
-
-mAX_Long_REG :: Int
-mAX_Long_REG = MAX_LONG_REG
-
-mAX_Real_Vanilla_REG :: Int
-mAX_Real_Vanilla_REG = MAX_REAL_VANILLA_REG
-
-mAX_Real_Float_REG :: Int
-mAX_Real_Float_REG = MAX_REAL_FLOAT_REG
-
-mAX_Real_Double_REG :: Int
-mAX_Real_Double_REG = MAX_REAL_DOUBLE_REG
-
-mAX_Real_Long_REG :: Int
-#ifdef MAX_REAL_LONG_REG
-mAX_Real_Long_REG = MAX_REAL_LONG_REG
-#else
-mAX_Real_Long_REG = 0
-#endif
-
-- Closure header sizes.
sTD_HDR_SIZE :: Int
diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c
index 799ba422d2..6246a29dac 100644
--- a/includes/mkDerivedConstants.c
+++ b/includes/mkDerivedConstants.c
@@ -652,6 +652,22 @@ main(int argc, char *argv[])
constantInt("mUT_ARR_PTRS_CARD_BITS", MUT_ARR_PTRS_CARD_BITS);
+ // A section of code-generator-related MAGIC CONSTANTS.
+ constantInt("mAX_Vanilla_REG", MAX_VANILLA_REG);
+ constantInt("mAX_Float_REG", MAX_FLOAT_REG);
+ constantInt("mAX_Double_REG", MAX_DOUBLE_REG);
+ constantInt("mAX_Long_REG", MAX_LONG_REG);
+ constantInt("mAX_Real_Vanilla_REG", MAX_REAL_VANILLA_REG);
+ constantInt("mAX_Real_Float_REG", MAX_REAL_FLOAT_REG);
+ constantInt("mAX_Real_Double_REG", MAX_REAL_DOUBLE_REG);
+ constantInt("mAX_Real_Long_REG",
+#ifdef MAX_REAL_LONG_REG
+ MAX_REAL_LONG_REG
+#else
+ 0
+#endif
+ );
+
switch (mode) {
case Gen_Haskell_Type:
printf(" } deriving (Read, Show)\n");