From: Nicholas Clark Date: Thu, 16 Oct 2008 20:18:39 +0000 (+0000) Subject: Clarify which save types are in mathoms, which aren't used, and which X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=95e06916561ca1cbaa0ca21057644bd664ebf2dc;p=p5sagit%2Fp5-mst-13.2.git Clarify which save types are in mathoms, which aren't used, and which still are in use. p4raw-id: //depot/perl@34494 --- diff --git a/scope.c b/scope.c index 35caf3f..a5ae429 100644 --- a/scope.c +++ b/scope.c @@ -1037,16 +1037,29 @@ Perl_leave_scope(pTHX_ I32 base) SvFLAGS(sv) |= val; } break; - /* These are only saved in mathoms.c */ + + /* This would be a mathom, but Perl_save_svref() calls a static + function, S_save_scalar_at(), so has to stay in this file. */ case SAVEt_SVREF: /* scalar reference */ value = (SV*)SSPOPPTR; ptr = SSPOPPTR; av = NULL; /* what to refcnt_dec */ goto restore_sv; + + /* These are only saved in mathoms.c */ + case SAVEt_NSTAB: + gv = (GV*)SSPOPPTR; + (void)sv_clear((SV*)gv); + break; case SAVEt_LONG: /* long reference */ ptr = SSPOPPTR; *(long*)ptr = (long)SSPOPLONG; break; + case SAVEt_IV: /* IV reference */ + ptr = SSPOPPTR; + *(IV*)ptr = (IV)SSPOPIV; + break; + case SAVEt_I16: /* I16 reference */ ptr = SSPOPPTR; *(I16*)ptr = (I16)SSPOPINT; @@ -1055,14 +1068,6 @@ Perl_leave_scope(pTHX_ I32 base) ptr = SSPOPPTR; *(I8*)ptr = (I8)SSPOPINT; break; - case SAVEt_IV: /* IV reference */ - ptr = SSPOPPTR; - *(IV*)ptr = (IV)SSPOPIV; - break; - case SAVEt_NSTAB: - gv = (GV*)SSPOPPTR; - (void)sv_clear((SV*)gv); - break; case SAVEt_DESTRUCTOR: ptr = SSPOPPTR; (*SSPOPDPTR)(ptr);