This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
features: populate cop_features from a hints hash the hard way
authorTony Cook <tony@develop-help.com>
Wed, 23 Aug 2023 04:52:20 +0000 (14:52 +1000)
committerTony Cook <tony@develop-help.com>
Thu, 31 Aug 2023 00:07:20 +0000 (10:07 +1000)
commitb5cbb3ced7a7793c62e1d960233c152ea66f7a00
tree7a7fb4c7d90127a3c43567c70174da1c16b66092
parent9c282e5748769f98028abac95f6a5713293f587b
features: populate cop_features from a hints hash the hard way

I originally optimised populating cop_features for eval by storing
the hints mask in "feature/bits" and then fetching that when
re-populating the hints for eval.

But that has turned out to be too fragile, so iterate over the
possible feature keys and populate cop_features from that.

I could perhaps have avoided this cost by ensuring "feature/bits" was
set where else it was needed, but this code already iterates to build
the hints hash, iterating again doesn't increase the scale of the work
we're doing.
feature.h
op.c
regen/feature.pl