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

smoke-me/khw-av mathoms and symbols av_top av_len

From:
bulk88
Date:
December 28, 2012 22:17
Subject:
smoke-me/khw-av mathoms and symbols av_top av_len
Message ID:
BLU0-SMTP1330D322B983B9428AD4219DF3F0@phx.gbl
cCnsider also http://grep.cpan.me/?q=Perl_av_len

In 
http://perl5.git.perl.org/perl.git/commitdiff/e3bb3908efdea1542bba0b11ce4fe123a367d72b 
I see Perl_av_top is a func that calls Perl_av_len, but av_top is 
macroed to av_len. But there is a dedicated Perl_av_top non exported 
(???)(not sure how embed.fnc 'A', 'b' and 'm' interact) function.  I 
don't think this thought out well at the moment. AFAIK Perl is 
source/API compatible but not ABI compatible between major releases. Why 
not define Perl_av_top to Perl_av_len, or the other way around, the same 
with av_top and av_len, or rename the guts function Perl_av_len to 
Perl_av_top?

possible cons to current situation
-an extra export in a SO (if .fnc A, b and m combined lead to an export)
-an extra C stack frame because a compiler was too dumb, or in -Od mode, 
or in per-compiland/object file optimization only mode (no IPO) to 
realize to replace all func *s to Perl_av_top with Perl_av_len or 
Perl_av_top being a single jmp instruction
-C callstacks with -Od will have 1 extra distracting entry if compiler 
was dumb
-1 unconditional jump assembly instruction on mediocre but not very dumb 
compilers from Perl_av_top to Perl_av_len
-can't cut the wrapper function out with NO_MATHOMS
-if Perl_av_top is not exported since its not public (only av_top is 
public), then why have it at all?










nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About