Commit 9b514ded authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

rts/RetainerProfile: Const-correctness fixes

These were found while using Hadrian, which apparently uses slightly
stricter warning flags than the make-based build system.

Test Plan: Validate

Reviewers: austin, erikd, simonmar

Reviewed By: erikd

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3679
parent 625143f4
...@@ -322,7 +322,7 @@ find_ptrs( stackPos *info ) ...@@ -322,7 +322,7 @@ find_ptrs( stackPos *info )
* Initializes *info from SRT information stored in *infoTable. * Initializes *info from SRT information stored in *infoTable.
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
static INLINE void static INLINE void
init_srt_fun( stackPos *info, StgFunInfoTable *infoTable ) init_srt_fun( stackPos *info, const StgFunInfoTable *infoTable )
{ {
if (infoTable->i.srt_bitmap == (StgHalfWord)(-1)) { if (infoTable->i.srt_bitmap == (StgHalfWord)(-1)) {
info->type = posTypeLargeSRT; info->type = posTypeLargeSRT;
...@@ -336,7 +336,7 @@ init_srt_fun( stackPos *info, StgFunInfoTable *infoTable ) ...@@ -336,7 +336,7 @@ init_srt_fun( stackPos *info, StgFunInfoTable *infoTable )
} }
static INLINE void static INLINE void
init_srt_thunk( stackPos *info, StgThunkInfoTable *infoTable ) init_srt_thunk( stackPos *info, const StgThunkInfoTable *infoTable )
{ {
if (infoTable->i.srt_bitmap == (StgHalfWord)(-1)) { if (infoTable->i.srt_bitmap == (StgHalfWord)(-1)) {
info->type = posTypeLargeSRT; info->type = posTypeLargeSRT;
...@@ -1279,7 +1279,7 @@ retainStack( StgClosure *c, retainer c_child_r, ...@@ -1279,7 +1279,7 @@ retainStack( StgClosure *c, retainer c_child_r,
{ {
stackElement *oldStackBoundary; stackElement *oldStackBoundary;
StgPtr p; StgPtr p;
StgRetInfoTable *info; const StgRetInfoTable *info;
StgWord bitmap; StgWord bitmap;
uint32_t size; uint32_t size;
...@@ -1355,7 +1355,7 @@ retainStack( StgClosure *c, retainer c_child_r, ...@@ -1355,7 +1355,7 @@ retainStack( StgClosure *c, retainer c_child_r,
case RET_FUN: { case RET_FUN: {
StgRetFun *ret_fun = (StgRetFun *)p; StgRetFun *ret_fun = (StgRetFun *)p;
StgFunInfoTable *fun_info; const StgFunInfoTable *fun_info;
retainClosure(ret_fun->fun, c, c_child_r); retainClosure(ret_fun->fun, c, c_child_r);
fun_info = get_fun_itbl(UNTAG_CONST_CLOSURE(ret_fun->fun)); fun_info = get_fun_itbl(UNTAG_CONST_CLOSURE(ret_fun->fun));
...@@ -1411,7 +1411,7 @@ retain_PAP_payload (StgClosure *pap, /* NOT tagged */ ...@@ -1411,7 +1411,7 @@ retain_PAP_payload (StgClosure *pap, /* NOT tagged */
{ {
StgPtr p; StgPtr p;
StgWord bitmap; StgWord bitmap;
StgFunInfoTable *fun_info; const StgFunInfoTable *fun_info;
retainClosure(fun, pap, c_child_r); retainClosure(fun, pap, c_child_r);
fun = UNTAG_CLOSURE(fun); fun = UNTAG_CLOSURE(fun);
...@@ -1669,10 +1669,10 @@ inner_loop: ...@@ -1669,10 +1669,10 @@ inner_loop:
{ {
StgTSO *tso = (StgTSO *)c; StgTSO *tso = (StgTSO *)c;
retainClosure(tso->stackobj, c, c_child_r); retainClosure((StgClosure*) tso->stackobj, c, c_child_r);
retainClosure(tso->blocked_exceptions, c, c_child_r); retainClosure((StgClosure*) tso->blocked_exceptions, c, c_child_r);
retainClosure(tso->bq, c, c_child_r); retainClosure((StgClosure*) tso->bq, c, c_child_r);
retainClosure(tso->trec, c, c_child_r); retainClosure((StgClosure*) tso->trec, c, c_child_r);
if ( tso->why_blocked == BlockedOnMVar if ( tso->why_blocked == BlockedOnMVar
|| tso->why_blocked == BlockedOnMVarRead || tso->why_blocked == BlockedOnMVarRead
|| tso->why_blocked == BlockedOnBlackHole || tso->why_blocked == BlockedOnBlackHole
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment