Skip to content

Commit

Permalink
[pmc] callcontext: manual WBs for shift_pmc & shift_string
Browse files Browse the repository at this point in the history
  • Loading branch information
ZYROz authored and Reini Urban committed May 27, 2014
1 parent 25bd977 commit 23b85ba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/pmc/callcontext.pmc
Expand Up @@ -1118,7 +1118,7 @@ return current Namespace
SET_ATTR_num_positionals(INTERP, SELF, size + 1);
}

VTABLE PMC * shift_pmc() {
VTABLE PMC * shift_pmc() :manual_wb {
Pcc_cell *cells;
PMC *retval;
const INTVAL size = STATICSELF.elements();
Expand All @@ -1131,6 +1131,9 @@ return current Namespace

GET_ATTR_positionals(INTERP, SELF, cells);
type = CELL_TYPE_MASK(&cells[0]);

PARROT_GC_WRITE_BARRIER(INTERP, SELF);

retval = autobox_pmc(INTERP, &cells[0], type);

for (i = 1; i < size; ++i)
Expand All @@ -1140,7 +1143,7 @@ return current Namespace
return retval;
}

VTABLE STRING * shift_string() {
VTABLE STRING * shift_string() :manual_wb {
Pcc_cell *cells;
STRING *retval;
const INTVAL size = STATICSELF.elements();
Expand All @@ -1152,6 +1155,8 @@ return current Namespace
"Cannot shift PMC from empty CallContext");

GET_ATTR_positionals(INTERP, SELF, cells);
PARROT_GC_WRITE_BARRIER(INTERP, SELF);

retval = autobox_string(INTERP, &cells[0]);

for (i = 1; i < size; ++i)
Expand Down

0 comments on commit 23b85ba

Please sign in to comment.