summaryrefslogtreecommitdiff
path: root/inline.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-09-11 20:22:57 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-11 20:22:57 -0700
commit8de476573990fa8cc938a6ad450e0fb337234ff4 (patch)
treeea3fa982289f1d318df235be044c88dcd3645e03 /inline.h
parent9ef8d5694201d933f4a61efde1fac904a29f55de (diff)
downloadperl-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.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/inline.h b/inline.h
index 2b988a2019..c55ce23799 100644
--- a/inline.h
+++ b/inline.h
@@ -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 ------------------------------- */