| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
current_bundle() was added after 5.14.0 was released, so has never been in
a stable release. Hence it's totally safe to kill it.
|
|
|
|
|
| |
normalise_hints() was added after 5.14.0 was released, so has never been in
a stable release. Hence it's totally safe to kill it.
|
| |
|
|
|
|
|
|
|
|
|
| |
There were a couple of inconsistencies (shift with/without an explicit @_,
exists with/without(), !@_ vs @_ == 0) which turn out to date back to
before 5.10.0
Also fix an inadvertent use of a single element array slice with a simple
array lookup in current_bundle().
|
|
|
|
|
|
|
|
|
| |
‘Normalise’ in this case means to set $^H to indicate that features
are in %^H (FEATURE_BUNDLE_CUSTOM) and to make %^H contain the current
feature set.
Since ‘no feature’ sets the default feature bundle in $^H, this is
unnecessary in that case.
|
| |
|
|
|
|
|
|
|
|
|
| |
See https://rt.perl.org/rt3/Ticket/Display.html?id=108776
"no feature" now resets to the default feature set. To disable all
features (which is likely to be a pretty special-purpose request, since
it presumably won't match any named set of semantics) you can now
write "no feature ':all'"
|
|
|
|
|
|
|
|
|
|
| |
As described in the pod changes in this commit, this changes quotemeta()
to consistenly quote non-ASCII characters when used under
unicode_strings. The behavior is changed for these and UTF-8 encoded
strings to more closely align with Unicode's recommendations.
The end result is that we *could* at some future point start using other
characters as metacharacters than the 12 we do now.
|
|
|
|
| |
It doesn't do anything yet.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise CURRENT_FEATURE_BUNDLE will end up including any hints added
later that happen to use higher bits.
This was causing autobox to turn off all features, causing failures
for Dist::Zilla::PluginBundle::AVAR.
I’m not adding tests for this, as such tests would need constant
tweaking in future perl developement. What autobox is doing is
naughty and unsupported anyway.
|
| |
|
|
|
|
|
|
| |
Since feature.pm is now a generated file, there is no reason to hard-
code constants from perl.h into it. We can get them from perl.h auto-
matically.
|
|
|
|
|
|
|
|
|
| |
When a version declaration has been seen, it’s not possible to deparse
the code perfectly correctly, but using ‘no feature; use feature
"5.14"’ is a reasonable tradeoff. See also commit 1c74777c25.
This necessitated sorting %^H keys that are output to keep tests pass-
ing. Previously they were relying on phases of the moon.
|
| |
|
|
|
|
|
| |
In case #define is changed to # define some day. (Not likely, but
this will make things easier for future maintainers.)
|
| |
|
|
|
|
|
| |
unicode_strings was not the longest string. We can determine it auto-
matically, now that this macro is in a generated file.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PL_hints/$^H can hold feature bundle hints that cause %^H to be
ignored when features are looked up.
When feature->import and ->unimport are invoked, they set bits in $^H
such that %^H is used once more. But they have to modify %^H to con-
tain what the bits in $^H imply.
Up till now, unimport was delegating to import, which meant that more
work was being done than necessary, because import would then detect
the special condition of $^H and repeat (some of) that work.
|
|
|
|
|
|
|
|
|
|
| |
Now ‘use v5.22’ and ‘use 5.005’ no longer have to load feature.pm
to enable the current feature bundle. All they do is twiddle bits
in PL_hints.
Since version declarations no longer call feature->unimport, there
may be junk left over in %^H (which we leave for speed’s sake), so
feature.pm has to delete that junk before enabling features.
|
| |
|
|
|
|
|
| |
It makes little sense to have it in perl.h any more. (Until
recently, feature.h didn’t exist.)
|
|
|
|
|
|
| |
Now that we have hints in $^H to indicate the default feature bun-
dle, there is no need for entries in %^H that turn features off by
their presence.
|
|
|
|
|
| |
so that people as crazy as I won’t try to add internal
names like ~~_--~!_.
|
|
|
|
| |
unsigned >= 0 produces a warning, even if the 0 is actually a macro.
|
|
|
|
|
|
|
|
|
|
| |
The core does not use these hints just yet, but feature.pm can start
setting them.
Currently, the hint bits for feature bundles (CURRENT_FEATURE_BUNDLE
in feature.h) are equal to FEATURE_BUNDLE_DEFAULT (0) by default.
feature.pm sets them to FEATURE_BUNDLE_CUSTOM when modifying
hint settings.
|
|
|
|
|
|
| |
This is for when we switch over to using hints in $^H for feature bun-
dles. When $bundle_number == $hint_mask, it means that the hints in
%^H apply.
|
|
|
|
|
| |
This variable, added in the previous commit for feature.pm’s sake,
also makes generating constants in feature.h simpler.
|
|
|
|
|
| |
It’s going to need them, in order to determine which list of features
is currently enabled.
|
| |
|
|
|
|
|
| |
This commit adds comments that give this file some semblance of
structure.
|
|
|
|
|
| |
This puts it with the other code that generates ‘global’ variables
used by generation code.
|
| |
|
|
|
|
|
| |
This hash will be used by subsequent commits to generate macros for
checking individual features.
|
|
|
|
|
|
|
|
|
| |
CURRENT_HINTS is not specific to features, but for now will be used by
nothing else. It returns the compile-time or run-time hints, depend-
ing on whether PL_curcop points to &PL_compiling.
CURRENT_FEATURE_BUNDLE extracts the feature bundle number from the
current hints.
|
| |
|
| |
|
|
|
|
| |
This will make it possible to create macros for each.
|
|
|
|
|
|
|
| |
It’s not necessary to repeat it, as we can simply add it to feature.pm
when we generate it.
Removing it makes these data usable for feature.h, too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
%UniqueBundles was added for generating constants in feature.h, but
we can use it for feature.pm’s %feature_bundle as well, simplify-
ing the code.
This eliminates this piece of code in feature.pm, spelling it
out longhand:
# Each of these is the same as the previous bundle
for (12,13,14,16) {
$feature_bundle{"5.$_"} = $feature_bundle{"5.".($_-1)}
}
While that code might be neat, it would make the generation code
unduly complex. (It was designed for hand-editing anyway.)
|
| |
|
| |
|
|
This script generates lib/feature.pm. Soon it will be made to gener-
ate other files, too.
|