diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-07-08 14:53:32 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-09-22 15:18:10 +0200 |
commit | 753552285ee6f988f8a8f6729d09a4d7b228490c (patch) | |
tree | d19ba9c1eaf7ca287e92e5ec232277cc1bcbf52e /rts/TraverseHeap.c | |
parent | 52c5ea71515df9fa655de8c94ec75510f417362e (diff) | |
download | haskell-753552285ee6f988f8a8f6729d09a4d7b228490c.tar.gz |
rts: TraverseHeap: Make pushStackElement argument const
Diffstat (limited to 'rts/TraverseHeap.c')
-rw-r--r-- | rts/TraverseHeap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/TraverseHeap.c b/rts/TraverseHeap.c index e025378c92..893b837fdc 100644 --- a/rts/TraverseHeap.c +++ b/rts/TraverseHeap.c @@ -298,7 +298,7 @@ find_srt( stackPos *info ) * traversal work-stack. */ static void -pushStackElement(traverseState *ts, stackElement *se) +pushStackElement(traverseState *ts, const stackElement se) { bdescr *nbd; // Next Block Descriptor if (ts->stackTop - 1 < ts->stackBottom) { @@ -325,7 +325,7 @@ pushStackElement(traverseState *ts, stackElement *se) // following statement by either a memcpy() call or a switch statement // on the type of the element. Currently, the size of stackElement is // small enough (5 words) that this direct assignment seems to be enough. - *ts->stackTop = *se; + *ts->stackTop = se; ts->stackSize++; if (ts->stackSize > ts->maxStackSize) ts->maxStackSize = ts->stackSize; @@ -349,7 +349,7 @@ traversePushClosure(traverseState *ts, StgClosure *c, StgClosure *cp, stackData se.data = data; se.info.type = posTypeFresh; - pushStackElement(ts, &se); + pushStackElement(ts, se); }; /** @@ -576,7 +576,7 @@ traversePushChildren(traverseState *ts, StgClosure *c, stackData data, StgClosur // here though. So type must be !=posTypeFresh. ASSERT(se.info.type != posTypeFresh); - pushStackElement(ts, &se); + pushStackElement(ts, se); } /** |