rts: More const correct-ness fixes
authorErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 17 May 2016 20:33:03 +0000 (06:33 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 17 May 2016 20:33:03 +0000 (06:33 +1000)
commit33c029dd77888ee5f9b1c7ce8884c982e0428adf
tree6c38a3f4c4dcc2fb20a8ce4a1c9d1dc520ec6f9d
parent5d80d14196ef048ffe037b2d92af2e9af0cb9e19
rts: More const correct-ness fixes

In addition to more const-correctness fixes this patch fixes an
infelicity of the previous const-correctness patch (995cf0f356) which
left `UNTAG_CLOSURE` taking a `const StgClosure` pointer parameter
but returning a non-const pointer. Here we restore the original type
signature of `UNTAG_CLOSURE` and add a new function
`UNTAG_CONST_CLOSURE` which takes and returns a const `StgClosure`
pointer and uses that wherever possible.

Test Plan: Validate on Linux, OS X and Windows

Reviewers: Phyx, hsyl20, bgamari, austin, simonmar, trofi

Reviewed By: simonmar, trofi

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2231
21 files changed:
includes/rts/storage/ClosureMacros.h
includes/rts/storage/InfoTables.h
rts/CheckUnload.c
rts/Hash.c
rts/Hash.h
rts/Hpc.c
rts/Printer.c
rts/Printer.h
rts/ProfHeap.c
rts/Profiling.c
rts/RaiseAsync.c
rts/RetainerProfile.c
rts/RtsAPI.c
rts/STM.c
rts/Schedule.c
rts/Stable.c
rts/ThreadPaused.c
rts/sm/Compact.c
rts/sm/Sanity.c
rts/sm/Sanity.h
rts/sm/Scav.c