This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Replace run-time on-demand initialisation of PL_bitcount with a constant table.
authorNicholas Clark <nick@ccl4.org>
Wed, 20 May 2009 06:30:48 +0000 (08:30 +0200)
committerNicholas Clark <nick@ccl4.org>
Wed, 20 May 2009 08:50:04 +0000 (10:50 +0200)
commitefa50c51e3301a2ca8be765fedfdae78eff1615b
treeef032fdb284883023b030a999bb925240c7d24be
parent869053c868a03539389422a7a28502818825a940
Replace run-time on-demand initialisation of PL_bitcount with a constant table.
(The table is 256 bytes; the run-time initialisation code is larger than this!)
Adapt generate_uudmap.c to generate the initalisation block for PL_bitcount,
writing the code to bitcount.h, using the same approach as uudmap.h.

To preserve binary compatibility:
for MULTIPLICITY:
  keep Ibitcount in the interpreter structure, but remove all the macros that
  access it. PL_bitcount is a new symbol in the object file, which won't clash
  with anything as that name wasn't used before.
otherwise:
  keep PL_bitcount as a char *, but initialise it at compile time to a new
  constant array PL_bitcount array. Remove the code that attempts to Safefree()
  it at interpreter destruction time.
12 files changed:
Makefile.SH
embed.pl
embedvar.h
generate_uudmap.c
intrpvar.h
perl.c
perl.h
pp_pack.c
sv.c
vms/descrip_mms.template
win32/Makefile
win32/makefile.mk