diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-09-11 20:22:57 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-11 20:22:57 -0700 |
commit | 8de476573990fa8cc938a6ad450e0fb337234ff4 (patch) | |
tree | ea3fa982289f1d318df235be044c88dcd3645e03 /inline.h | |
parent | 9ef8d5694201d933f4a61efde1fac904a29f55de (diff) | |
download | perl-8de476573990fa8cc938a6ad450e0fb337234ff4.tar.gz |
Unify CvDEPTH for formats and subs
As Dave Mitchell pointed out, while putting the CvDEPTH field for for-
mats in the SvCUR slot might save memory for formats, it slows down
sub calls because CvDEPTH is used on subs in very hot code paths.
Checking the SvTYPE to determine which field to use should not be
necessary.
Diffstat (limited to 'inline.h')
-rw-r--r-- | inline.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -18,9 +18,7 @@ PERL_STATIC_INLINE I32 * S_CvDEPTHp(const CV * const sv) { assert(SvTYPE(sv) == SVt_PVCV || SvTYPE(sv) == SVt_PVFM); - return SvTYPE(sv) == SVt_PVCV - ? &((XPVCV*)SvANY(sv))->xcv_depth - : &((XPVCV*)SvANY(sv))->xpv_fmdepth; + return &((XPVCV*)SvANY(sv))->xcv_depth; } /* ------------------------------- sv.h ------------------------------- */ |