summaryrefslogtreecommitdiff
path: root/inline.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-09-22 20:25:29 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-24 22:05:32 -0700
commitc0683843e9299db25f354e2c8c90faa7614950d1 (patch)
treed04aa4c5ce513518451e7a2c86c58fc3219cf9ad /inline.h
parent369236063a992c09b5fd6efb6f0910bd1d5effcd (diff)
downloadperl-c0683843e9299db25f354e2c8c90faa7614950d1.tar.gz
Stop setting PADMY; renumber PADSTALE
The PADMY flag was originally used on values stored in pads as a way to mark those slots ase being in use already during pad allocation. That changed for the most part all the way back in bbce6d6978 (perl5.003_09), but vestiges still remained, because some ops used PADMY for their targets. I removed the last one yesterday in 14d91147. So the PADMY flag now serves no purpose. At run time, the sole purpose of PADMY is to determine the meaning of the flag bit shared by PADTMP and PADSTALE. If PADMY is set, the flag means the latter. Instead of that more complicated check, we can just renumber PADSTALE to use the PADMY bit and assume that anything not PADTMP is PADMY. This commit changes the flags and does just enough to get tests passing (except Peek.t). fixup for padmy flag renumbering
Diffstat (limited to 'inline.h')
-rw-r--r--inline.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/inline.h b/inline.h
index ad6edf20df..873055d887 100644
--- a/inline.h
+++ b/inline.h
@@ -170,13 +170,13 @@ S_SvPADTMP_off(SV *sv)
PERL_STATIC_INLINE U32
S_SvPADSTALE_on(SV *sv)
{
- assert(SvFLAGS(sv) & SVs_PADMY);
+ assert(!(SvFLAGS(sv) & SVs_PADTMP));
return SvFLAGS(sv) |= SVs_PADSTALE;
}
PERL_STATIC_INLINE U32
S_SvPADSTALE_off(SV *sv)
{
- assert(SvFLAGS(sv) & SVs_PADMY);
+ assert(!(SvFLAGS(sv) & SVs_PADTMP));
return SvFLAGS(sv) &= ~SVs_PADSTALE;
}
#if defined(PERL_CORE) || defined (PERL_EXT)