summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-16 19:42:07 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-16 19:42:07 +0100
commit7ecefb6b30c3b249bba0454586c4a008d66d567b (patch)
tree14f9c6c425ba9b0dbeeff024c3546ebc906f9ca3 /includes
parent17910899dacc892fd652d9206340d2bc2b2c5fc1 (diff)
downloadhaskell-7ecefb6b30c3b249bba0454586c4a008d66d567b.tar.gz
Move more constants to platformConstants
Diffstat (limited to 'includes')
-rw-r--r--includes/HaskellConstants.hs21
-rw-r--r--includes/mkDerivedConstants.c11
2 files changed, 11 insertions, 21 deletions
diff --git a/includes/HaskellConstants.hs b/includes/HaskellConstants.hs
index 5b9a5ba1ac..e692a723d0 100644
--- a/includes/HaskellConstants.hs
+++ b/includes/HaskellConstants.hs
@@ -34,11 +34,6 @@ mAX_CONTEXT_REDUCTION_DEPTH :: Int
mAX_CONTEXT_REDUCTION_DEPTH = 200
-- Increase to 200; see Trac #5395
--- Size of a double in StgWords.
-
-dOUBLE_SIZE :: Int
-dOUBLE_SIZE = SIZEOF_DOUBLE
-
wORD64_SIZE :: Int
wORD64_SIZE = 8
@@ -73,19 +68,3 @@ tAG_MASK = (1 `shiftL` tAG_BITS) - 1
mAX_PTR_TAG :: Int
mAX_PTR_TAG = tAG_MASK
--- Size of a C int, in bytes. May be smaller than wORD_SIZE.
-
-cINT_SIZE :: Int
-cINT_SIZE = SIZEOF_INT
-
-cLONG_SIZE :: Int
-cLONG_SIZE = SIZEOF_LONG
-
-cLONG_LONG_SIZE :: Int
-cLONG_LONG_SIZE = SIZEOF_LONG_LONG
-
--- Number of bits to shift a bitfield left by in an info table.
-
-bITMAP_BITS_SHIFT :: Int
-bITMAP_BITS_SHIFT = BITMAP_BITS_SHIFT
-
diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c
index a6d2230d6e..86bf63e5fd 100644
--- a/includes/mkDerivedConstants.c
+++ b/includes/mkDerivedConstants.c
@@ -686,6 +686,17 @@ main(int argc, char *argv[])
// Size of a word, in bytes
constantInt("wORD_SIZE", SIZEOF_HSWORD);
+ // Size of a double in StgWords.
+ constantInt("dOUBLE_SIZE", SIZEOF_DOUBLE);
+
+ // Size of a C int, in bytes. May be smaller than wORD_SIZE.
+ constantInt("cINT_SIZE", SIZEOF_INT);
+ constantInt("cLONG_SIZE", SIZEOF_LONG);
+ constantInt("cLONG_LONG_SIZE", SIZEOF_LONG_LONG);
+
+ // Number of bits to shift a bitfield left by in an info table.
+ constantInt("bITMAP_BITS_SHIFT", BITMAP_BITS_SHIFT);
+
switch (mode) {
case Gen_Haskell_Type:
printf(" } deriving (Read, Show)\n");