summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-20 17:48:21 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-20 17:48:21 +0000
commitbb17208353b2f15e0bf22099038f9ea336d6de2a (patch)
tree5c1ace6caa469990ceca08a4a829a4ea29250b21 /sv.c
parent8a27f21b702728eba502a2ab9428475e0535d96d (diff)
downloadperl-bb17208353b2f15e0bf22099038f9ea336d6de2a.tar.gz
PVFMs don't need CvDEPTH, and PVCVs don't use SvIVX, so moving
xcv_depth into the IV union saves 4(ish) bytes per CV and format. "ish" because it was a long, but has been changed to I32 (along with the corresponding field in struct block_sub) so as not to enlarge the IV union on platforms where sizeof(long) > sizeof(IV), or struct block_sub where sizeof(long) > sizeof(I32) p4raw-id: //depot/perl@27247
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index 7619c7d274..4f7f35acae 100644
--- a/sv.c
+++ b/sv.c
@@ -9819,8 +9819,11 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param)
av_push(param->stashes, dstr);
}
break;
- case SVt_PVFM:
case SVt_PVCV:
+ if (!(param->flags & CLONEf_COPY_STACKS)) {
+ CvDEPTH(dstr) = 0;
+ }
+ case SVt_PVFM:
/* NOTE: not refcounted */
CvSTASH(dstr) = hv_dup(CvSTASH(dstr), param);
OP_REFCNT_LOCK;
@@ -9836,9 +9839,6 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param)
* duped GV may never be freed. A bit of a hack! DAPM */
CvGV(dstr) = (param->flags & CLONEf_JOIN_IN) ?
NULL : gv_dup(CvGV(dstr), param) ;
- if (!(param->flags & CLONEf_COPY_STACKS)) {
- CvDEPTH(dstr) = 0;
- }
PAD_DUP(CvPADLIST(dstr), CvPADLIST(sstr), param);
CvOUTSIDE(dstr) =
CvWEAKOUTSIDE(sstr)