This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
refactor Perl_cv_undef_flags
On VC 2003 32bits size of this function decreased from 0x321 bytes of
machine code to 0x2d8.
cv.h:
- partially reorder Cv* macros to match XPVCV member order
- create CvDEPTHunsafe which never uses SV head except for SvANY ptr since
Perl_cv_undef_flags uses a fake SV head
pad.c
- remove var slabbed, frees a C auto/non-vol register, there are only 2
uses, on CvSTART branch, CvFLAGS is reused frm CvISXSUB test by optimizer
- use a CV struct to fake a CV, to avoid rereading SvANY ptr after each
func call, CVs can't be upgraded or have their bodies realloced
- dont write NULL to CvFILE if CvFILE is NULL, also move NULL assignment
so CPU address generation can be reused by compiler
- refactor CvROOT/CvSTART/CvXSUB freeing conditionals to simplify code and
dont check CvISXSUB twice
- CvDEPTH requires a real CV*/CV*, since it checks the SV head with an
assert, use CvDEPTHunsafe instead, and inline the assert using the real
CV*. Also move runtime, non-debug "SvTYPE(cv) == SVt_PVCV" check to
debug builds per ML post
"about FC commit "CV-based slab allocation for ops""
- Perl_croak->Perl_croak_nocontext, remove push arg my_perl instruction
- refactor CvPADLIST freeing for provision for future XSUB sub usage of
CvPADLIST in a union
- in CvOUTSIDE freeing, move NULL assignment so CPU address generation can
be reused by compiler