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

PL_comppad_name at run time?

Thread Next
Father Chrysostomos
September 23, 2014 15:38
PL_comppad_name at run time?
Message ID:
Currently we set up PL_curpad to point to the sub’s pad in
pp_entersub.  But anything that needs to access the name pad (only
lexical subs, I think) has to call find_runcv, which searches the call
stack, and then extract the name pad from it.

If we introduce lvalue references (which I am working on now), lexical
scalars and state variables will have to access the name pad.  That
will slow things down considerably.

I know that pp_entersub avoids unnecessary work because it is very hot
code, but I think that having it set PL_comppad_name (or maybe a new
PL_curpad_name) would be a reasonable tradeoff.


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