summaryrefslogtreecommitdiff
path: root/rts/Printer.c
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2016-05-02 06:37:14 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2016-05-05 08:29:27 +1000
commitdb9de7eb3e91820024f673bfdb6fb8064cfed20d (patch)
tree5e1c3ef0b6dee7f40fedbc118ba36cfe6ffdd1ee /rts/Printer.c
parentad4392c142696d5092533480a82ed65322e9d413 (diff)
downloadhaskell-db9de7eb3e91820024f673bfdb6fb8064cfed20d.tar.gz
rts: Replace `nat` with `uint32_t`
The `nat` type was an alias for `unsigned int` with a comment saying it was at least 32 bits. We keep the typedef in case client code is using it but mark it as deprecated. Test Plan: Validated on Linux, OS X and Windows Reviewers: simonmar, austin, thomie, hvr, bgamari, hsyl20 Differential Revision: https://phabricator.haskell.org/D2166
Diffstat (limited to 'rts/Printer.c')
-rw-r--r--rts/Printer.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/rts/Printer.c b/rts/Printer.c
index 3b98ab4cd6..b4400da5b9 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -421,9 +421,10 @@ void printGraph( StgClosure *obj )
*/
static void
-printSmallBitmap( StgPtr spBottom, StgPtr payload, StgWord bitmap, nat size )
+printSmallBitmap( StgPtr spBottom, StgPtr payload, StgWord bitmap,
+ uint32_t size )
{
- nat i;
+ uint32_t i;
for(i = 0; i < size; i++, bitmap >>= 1 ) {
debugBelch(" stk[%ld] (%p) = ", (long)(spBottom-(payload+i)), payload+i);
@@ -437,10 +438,11 @@ printSmallBitmap( StgPtr spBottom, StgPtr payload, StgWord bitmap, nat size )
}
static void
-printLargeBitmap( StgPtr spBottom, StgPtr payload, StgLargeBitmap* large_bitmap, nat size )
+printLargeBitmap( StgPtr spBottom, StgPtr payload, StgLargeBitmap* large_bitmap,
+ uint32_t size )
{
StgWord bmp;
- nat i, j;
+ uint32_t i, j;
i = 0;
for (bmp=0; i < size; bmp++) {
@@ -756,7 +758,7 @@ findPtrBlocks (StgPtr p, bdescr *bd, StgPtr arr[], int arr_size, int i)
void
findPtr(P_ p, int follow)
{
- nat g, n;
+ uint32_t g, n;
bdescr *bd;
const int arr_size = 1024;
StgPtr arr[arr_size];
@@ -830,7 +832,7 @@ void prettyPrintClosure_ (StgClosure *obj)
case CONSTR_STATIC:
case CONSTR_NOCAF_STATIC:
{
- nat i;
+ uint32_t i;
char *descriptor;
/* find the con_info for the constructor */