summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-06-06 09:19:44 +0200
committerDaniel Gröber <dxld@darkboxed.org>2019-09-22 15:18:10 +0200
commit94ecdb4f24b6a66d09d0f7afc0b9728678bb7143 (patch)
tree18890c3b37c2df4d74acf576d307006a5d2c2161
parentead05f8045403e997c88c784b409d03c1fd0aee1 (diff)
downloadhaskell-94ecdb4f24b6a66d09d0f7afc0b9728678bb7143.tar.gz
rts: retainer: Move info.next.parent to stackElement
I don't see a point in having this live in 'info', just seems to make the code more complicated.
-rw-r--r--rts/RetainerProfile.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index 8eeda7ce1a..b8dc4557d6 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -146,10 +146,6 @@ typedef union {
struct {
StgClosure *srt;
} srt;
-
- // parent of the current object, used
- // when posTypeFresh is set
- StgClosure *parent;
} nextPos;
// Tagged stack element, that keeps information how to process
@@ -163,6 +159,9 @@ typedef struct {
// how to continue processing the element, and it's retainer set.
typedef struct {
StgClosure *c;
+ // parent of the current object, used
+ // when posTypeFresh is set
+ StgClosure *parent;
retainer c_child_r;
stackPos info;
} stackElement;
@@ -447,7 +446,7 @@ retainPushClosure( traverseState *ts, StgClosure *c, StgClosure *p, retainer c_c
se.c = c;
se.c_child_r = c_child_r;
- se.info.next.parent = p;
+ se.parent = p;
se.info.type = posTypeFresh;
retainActualPush(ts, &se);
@@ -788,7 +787,7 @@ pop( traverseState *ts, StgClosure **c, StgClosure **cp, retainer *r )
// If this is a top-level element, you should pop that out.
if (se->info.type == posTypeFresh) {
- *cp = se->info.next.parent;
+ *cp = se->parent;
*c = se->c;
*r = se->c_child_r;
popOff(ts);