develooper Front page | perl.perl5.porters | Postings from September 2012

aligning xcv_depth and xpvcuru_fmdepth

Thread Next
Dave Mitchell
September 5, 2012 16:40
aligning xcv_depth and xpvcuru_fmdepth
Message ID:
FC, since this commit:

    commit bb02a38febc60a289c616282d720015be97842a4
    Author:     Father Chrysostomos <>
    AuthorDate: Sun Aug 5 00:48:00 2012 -0700

    Add a depth field to formats
    Instead of lengthening the struct, we can reuse SvCUR, which is cur-
    rently unused.

the CvDEPTH macro is no longer a simple field access, but is now
a conditional access depending on whether the SV is a CV or XPVFM.
Given that CvDEPTH is used (repeatedly) within the exceedingly hot code
of pp_entersub() and similar, and that formats aren't particularly space
or performance critical, wouldn't it make more sense to increase the size
of struct xpvfm by one I32 so that it matches struct xpvcv (and thus the
xcv_depth is at the same offset in both structs), then revert CvDEPTH()
to being a simple field access again?

A power surge on the Bridge is rapidly and correctly diagnosed as a faulty
capacitor by the highly-trained and competent engineering staff.
    -- Things That Never Happen in "Star Trek" #9

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About