summaryrefslogtreecommitdiff
path: root/regen/feature.pl
Commit message (Collapse)AuthorAgeFilesLines
* In feature.pm, inline current_bundle() into __common(), its only caller.Nicholas Clark2012-03-191-7/+4
| | | | | 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.
* In feature.pm, inline normalise_hints() into __common(), its only caller.Nicholas Clark2012-03-191-11/+7
| | | | | 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.
* Merge the code common to feature::import and feature::unimport.Nicholas Clark2012-03-191-24/+11
|
* In feature.pm, use a consistent code style in import() and unimport().Nicholas Clark2012-03-191-5/+6
| | | | | | | | | 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().
* Don’t ‘normalise’ hints for bare ‘no feature’Father Chrysostomos2012-02-251-5/+5
| | | | | | | | | ‘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.
* regen/feature.pl: Show perl.h line num in error msgFather Chrysostomos2012-02-251-1/+1
|
* "no feature" now means reset to defaultRicardo Signes2012-02-221-7/+8
| | | | | | | | | 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'"
* perl #77654: quotemeta quotes non-ASCII consistentlyKarl Williamson2012-02-151-2/+2
| | | | | | | | | | 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.
* Add the fc keyword in regen/feature.plBrian Fraser2012-01-291-3/+13
| | | | It doesn't do anything yet.
* feature.h: Mask hints in CURRENT_FEATURE_BUNDLEFather Chrysostomos2012-01-281-1/+2
| | | | | | | | | | | | 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.
* Correct links to perlsyn and perlopFather Chrysostomos2012-01-051-1/+1
|
* feature.pl: Get HINT_UNI_8_BIT from perl.hFather Chrysostomos2011-12-241-12/+19
| | | | | | 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.
* Deparse implicit with ‘use feature’Father Chrysostomos2011-12-241-4/+4
| | | | | | | | | 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.
* use VERSION needs to enable uni8bit hintFather Chrysostomos2011-12-241-0/+4
|
* feature.pl: Make the perl.h search more resilientFather Chrysostomos2011-12-241-1/+1
| | | | | In case #define is changed to # define some day. (Not likely, but this will make things easier for future maintainers.)
* feature.pl: Mention perl.h as a sourceFather Chrysostomos2011-12-241-1/+2
|
* Make MAX_FEATURE_LEN reflect realityFather Chrysostomos2011-12-241-2/+6
| | | | | unicode_strings was not the longest string. We can determine it auto- matically, now that this macro is in a generated file.
* feature.h: FEATURE_IS_ENABLED can use CURRENT_HINTSFather Chrysostomos2011-12-241-1/+1
|
* feature.pl: Remove unused varFather Chrysostomos2011-12-241-1/+0
|
* feature.pm: Move hint normalisation to separate functionFather Chrysostomos2011-12-241-10/+13
| | | | | | | | | | | | | 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.
* op.c: Use new feature bundle hintsFather Chrysostomos2011-12-241-1/+5
| | | | | | | | | | 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.
* feature.h: Function for enabling bundlesFather Chrysostomos2011-12-241-0/+27
|
* Move FEATURE_IS_ENABLED to feature.hFather Chrysostomos2011-12-241-2/+9
| | | | | It makes little sense to have it in perl.h any more. (Until recently, feature.h didn’t exist.)
* Eliminate ‘negative’ featuresFather Chrysostomos2011-12-241-28/+7
| | | | | | 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.
* feature.pl: Tweak commentFather Chrysostomos2011-12-241-1/+1
| | | | | so that people as crazy as I won’t try to add internal names like ~~_--~!_.
* feature.h: Avoid compiler warningFather Chrysostomos2011-12-241-1/+12
| | | | unsigned >= 0 produces a warning, even if the 0 is actually a macro.
* feature.pm: Set bundle hints when dis/enabling featuresFather Chrysostomos2011-12-241-0/+12
| | | | | | | | | | 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.
* feature.pm: Add function for getting the current bundleFather Chrysostomos2011-12-241-0/+6
| | | | | | 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.
* feature.pl: Use @HintedBundles for generating feature.hFather Chrysostomos2011-12-241-5/+3
| | | | | This variable, added in the previous commit for feature.pm’s sake, also makes generating constants in feature.h simpler.
* Give feature.pm the bundle hintsFather Chrysostomos2011-12-241-1/+12
| | | | | It’s going to need them, in order to determine which list of features is currently enabled.
* feature.pl: Generate list of feature bundles in podFather Chrysostomos2011-12-241-11/+19
|
* feature.pl: Add section headersFather Chrysostomos2011-12-241-1/+18
| | | | | This commit adds comments that give this file some semblance of structure.
* feature.pl: Move hint-checking code upFather Chrysostomos2011-12-241-23/+24
| | | | | This puts it with the other code that generates ‘global’ variables used by generation code.
* Add macros for checking individual featuresFather Chrysostomos2011-12-241-0/+39
|
* feature.pl: %BundleRangesFather Chrysostomos2011-12-241-0/+19
| | | | | This hash will be used by subsequent commits to generate macros for checking individual features.
* feature.h: Add macros for current hintsFather Chrysostomos2011-12-241-0/+4
| | | | | | | | | 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.
* feature.h: Parenthesise macro definitionFather Chrysostomos2011-12-241-1/+1
|
* Make feature.pl executableFather Chrysostomos2011-12-241-0/+0
|
* Use only \w+ for internal feature namesFather Chrysostomos2011-12-241-1/+1
| | | | This will make it possible to create macros for each.
* feature.pl: Remove the feature_ prefix from the dataFather Chrysostomos2011-12-241-10/+11
| | | | | | | 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.
* feature.pl: Gen %feature_bundle from %UniqueBundlesFather Chrysostomos2011-12-241-23/+11
| | | | | | | | | | | | | | | | | %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.)
* Add feature.h, with constants for feature bundlesFather Chrysostomos2011-12-241-3/+46
|
* Parse the feature hint bits & assert their usabilityFather Chrysostomos2011-12-241-0/+20
|
* Create regen/feature.plFather Chrysostomos2011-12-241-0/+461
This script generates lib/feature.pm. Soon it will be made to gener- ate other files, too.