[commit: ghc] master: Use stdint types for Stg{Word, Int}{8, 16, 32, 64} (260a564)

git at git.haskell.org git at git.haskell.org
Tue May 10 06:38:10 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/260a5648c299636a94b12b9b97bf9743b0a1496d/ghc

>---------------------------------------------------------------

commit 260a5648c299636a94b12b9b97bf9743b0a1496d
Author: Tomas Carnecky <tomas.carnecky at gmail.com>
Date:   Sun May 8 14:44:07 2016 +0200

    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


>---------------------------------------------------------------

260a5648c299636a94b12b9b97bf9743b0a1496d
 includes/HsFFI.h     |  84 +++++++--------------------------
 includes/stg/Types.h | 130 +++++++++++++++++++++++++++++----------------------
 rts/ProfHeap.c       |   2 +-
 rts/Stats.c          |   6 +--
 rts/sm/Sanity.c      |   2 +-
 5 files changed, 96 insertions(+), 128 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 260a5648c299636a94b12b9b97bf9743b0a1496d


More information about the ghc-commits mailing list