summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-02-27 15:30:26 +0000
committerDavid Mitchell <davem@iabyn.com>2014-02-27 16:16:18 +0000
commit60779a30f61297ad86e175f686b7bc697c7b8e51 (patch)
treee1e560a9e7820e720fd99ef8f3d3c8ba46880dc6 /op.c
parent89a18b40609cfdfc4af7414a628064c743b836bd (diff)
downloadperl-60779a30f61297ad86e175f686b7bc697c7b8e51.tar.gz
don't set SvPADTMP() on PADGV's
Under threaded builds, GVs for OPs are stored in the pad rather than being directly attached to the op. For some reason, all such GV's were getting the SvPADTMP flag set. There seems to be be no good reason for this, and after skipping setting the flag, all tests still pass. The advantage of not setting this flag is that there are quite a few hot places in the code that do if (SvPADTMP(sv) && !IS_PADGV(sv)) { ... I've replaced them all with if (SvPADTMP(sv)) { assert(!IS_PADGV(sv)); ... Since the IS_PADGV() macro expands to something quite heavyweight, this is quite a saving: for example this commit reduces the size of pp_entersub by 111 bytes.
Diffstat (limited to 'op.c')
-rw-r--r--op.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/op.c b/op.c
index 45a8a37ac9..85158006b7 100644
--- a/op.c
+++ b/op.c
@@ -5192,7 +5192,6 @@ Perl_newPADOP(pTHX_ I32 type, I32 flags, SV *sv)
SvREFCNT_dec(PAD_SVl(padop->op_padix));
PAD_SETSV(padop->op_padix, sv);
assert(sv);
- SvPADTMP_on(sv);
padop->op_next = (OP*)padop;
padop->op_flags = (U8)flags;
if (PL_opargs[type] & OA_RETSCALAR)