Use stdint types for Stg{Word,Int}{8,16,32,64}
authorTomas Carnecky <tomas.carnecky@gmail.com>
Sun, 8 May 2016 12:44:07 +0000 (14:44 +0200)
committerBen Gamari <ben@smart-cactus.org>
Tue, 10 May 2016 06:40:50 +0000 (08:40 +0200)
commit260a5648c299636a94b12b9b97bf9743b0a1496d
tree2de1ffe579d1558d4352e496cf2e53b907e954d1
parentdd3e84701db7d05a6664aa5826732da3ee8ce265
Use stdint types for Stg{Word,Int}{8,16,32,64}

We can't define Stg{Int,Word} in terms of {,u}intptr_t because STG
depends on them being the exact same size as void*, and {,u}intptr_t
does not make that guarantee. Furthermore, we also need to define
StgHalf{Int,Word}, so the preprocessor if needs to stay. But we can at
least keep it in a single place instead of repeating it in various
files.

Also define STG_{INT,WORD}{8,16,32,64}_{MIN,MAX} and use it in HsFFI.h,
further reducing the need for CPP in other files.

Reviewers: austin, bgamari, simonmar, hvr, erikd

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2182
includes/HsFFI.h
includes/stg/Types.h
rts/ProfHeap.c
rts/Stats.c
rts/sm/Sanity.c