Skip to content

Commit 85011da

Browse files
committed
Write barriering in reprs, plus a re-ordering just in case that triggers an issue.
1 parent 956db58 commit 85011da

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

src/6model/reprs/HashAttrStore.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ static PMC * type_object_for(PARROT_INTERP, PMC *self, PMC *HOW) {
2020

2121
/* Create type object and point it back at the STable. We leave the
2222
* hash store pointer null to flag it's the type object. */
23-
st->WHAT = wrap_object(interp, obj);
2423
obj->common.stable = st_pmc;
24+
st->WHAT = wrap_object(interp, obj);
25+
PARROT_GC_WRITE_BARRIER(interp, st_pmc);
2526

2627
return st->WHAT;
2728
}

src/6model/reprs/KnowHOWREPR.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ static PMC * type_object_for(PARROT_INTERP, PMC *self, PMC *HOW) {
1919
STable *st = STABLE_STRUCT(st_pmc);
2020

2121
/* Create type object and point it back at the STable. */
22-
st->WHAT = wrap_object(interp, obj);
2322
obj->common.stable = st_pmc;
23+
st->WHAT = wrap_object(interp, obj);
24+
PARROT_GC_WRITE_BARRIER(interp, st_pmc);
2425

2526
return st->WHAT;
2627
}

src/6model/reprs/P6int.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ static PMC * type_object_for(PARROT_INTERP, PMC *self, PMC *HOW) {
1818
STable *st = STABLE_STRUCT(st_pmc);
1919

2020
/* Create type object and point it back at the STable. */
21-
st->WHAT = wrap_object(interp, obj);
2221
obj->common.stable = st_pmc;
22+
st->WHAT = wrap_object(interp, obj);
23+
PARROT_GC_WRITE_BARRIER(interp, st_pmc);
2324

2425
return st->WHAT;
2526
}

src/6model/reprs/P6num.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ static PMC * type_object_for(PARROT_INTERP, PMC *self, PMC *HOW) {
1818
STable *st = STABLE_STRUCT(st_pmc);
1919

2020
/* Create type object and point it back at the STable. */
21-
st->WHAT = wrap_object(interp, obj);
2221
obj->common.stable = st_pmc;
22+
st->WHAT = wrap_object(interp, obj);
23+
PARROT_GC_WRITE_BARRIER(interp, st_pmc);
2324

2425
return st->WHAT;
2526
}

src/6model/reprs/P6opaque.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,9 @@ static PMC * type_object_for(PARROT_INTERP, PMC *self, PMC *HOW) {
340340
* do *not* populate the spill pointer at all, we leave it null. A
341341
* non-null value (even PMCNULL) is what indicates we have a defined
342342
* object. Yes, I know, it's sick. */
343-
st->WHAT = wrap_object(interp, obj);
344343
obj->common.stable = st_pmc;
344+
st->WHAT = wrap_object(interp, obj);
345+
PARROT_GC_WRITE_BARRIER(interp, st_pmc);
345346

346347
return st->WHAT;
347348
}

src/6model/reprs/P6str.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ static PMC * type_object_for(PARROT_INTERP, PMC *self, PMC *HOW) {
1818
STable *st = STABLE_STRUCT(st_pmc);
1919

2020
/* Create type object and point it back at the STable. */
21-
st->WHAT = wrap_object(interp, obj);
2221
obj->common.stable = st_pmc;
22+
st->WHAT = wrap_object(interp, obj);
23+
PARROT_GC_WRITE_BARRIER(interp, st_pmc);
2324

2425
return st->WHAT;
2526
}

0 commit comments

Comments
 (0)