From 23b85ba99f7c7340ca731c7a23914c5fba570f81 Mon Sep 17 00:00:00 2001 From: ZYROz Date: Thu, 24 Apr 2014 01:10:19 +0530 Subject: [PATCH] [pmc] callcontext: manual WBs for shift_pmc & shift_string --- src/pmc/callcontext.pmc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pmc/callcontext.pmc b/src/pmc/callcontext.pmc index a14fe0b779..1426dde468 100644 --- a/src/pmc/callcontext.pmc +++ b/src/pmc/callcontext.pmc @@ -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(); @@ -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) @@ -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(); @@ -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)