This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Faster feature checks
authorTony Cook <tony@develop-help.com>
Thu, 24 Oct 2019 18:26:53 +0000 (05:26 +1100)
committerTony Cook <tony@develop-help.com>
Wed, 30 Oct 2019 19:09:37 +0000 (20:09 +0100)
commit9f601cf3bbfa6be3e2ab3468e77a7b79c80ff5cf
treecfb97c690e5e69e19f3e73fe532606008a1cd5ab
parent698f6cc7d55bb6b96940a610be050d2c6331ae04
Faster feature checks

Perform only a bit check instead of a much more expensive hash
lookup to test features.

For now I've just added a U32 to the cop structure to store the bits,
if we need more we could either add more bits directly, or make it a
pointer.

We don't have the immediate need for a pointer that warning do since
we don't dynamically add new features during compilation/runtime.

The changes to %^H are retained so that caller() can be used from perl
code to check the features enabled at a given caller's scope.
cop.h
feature.h
gv.c
lib/feature.pm
mg.c
op.c
pp_ctl.c
regen/feature.pl
scope.c