summaryrefslogtreecommitdiff
path: root/regen
Commit message (Collapse)AuthorAgeFilesLines
* Constant folding for xFather Chrysostomos2012-06-081-1/+1
|
* docs patch: 'unicode_strings' doesn't change utf8nessKarl Williamson2012-06-071-2/+3
| | | | | We had a field report of lack of clarity around this, so add some text.
* mk_PL_charclass.pl: Allow to work on early UnicodesKarl Williamson2012-06-021-3/+42
| | | | | | If the version of Unicode being compiled doesn't have the modern casefolding .txt file, get the values from Unicode::UCD. Also for EBCDIC, where otherwise the file would have to be translated.
* mk_invlists.pl: Add error check and die if failsKarl Williamson2012-06-021-0/+4
|
* Expunge study magicFather Chrysostomos2012-05-291-2/+0
| | | | I’m running out of synonyms for ‘remove’.
* Make pos use ck_fun and OA_SCALARREFFather Chrysostomos2012-05-291-1/+1
| | | | | | See the previous commit. The same applies here. In short, this allows core_prototype and pp_coreargs to be simpler.
* Make undef use ck_fun and OA_SCALARREFFather Chrysostomos2012-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In regen/opcodes, we have some operators that use ck_fun and have R for the argument. And there are some that use ck_lfun and have S for the argument. These both amount to more or less the same thing. ck_fun/R goes through the OA_SCALARREF case in ck_fun, which calls op_lvalue(scalar()) on the child op. ck_lfun/S goes through the OA_SCALAR case in ck_fun, which calls scalar(), and then ck_lfun sees to it that op_lvalue is called. The only real difference is that the OA_SCALAR case makes sure there are not too many arguments. Since both core_prototype and pp_coreargs need special cases to deal with OA_SCALAR that is really ‘supposed’ to be OA_SCALARREF, it becomes simpler to add &CORE::undef if undef uses R. In that case, we also have to put the argument-checking in the OA_SCALARREF, but we make it conditional on the op being an undef op, for the sake of doing one thing at a time. (This is a bit of a mess; see ticket #96006.)
* regen/mk_invlists.pl: Fail if inversion list not foundKarl Williamson2012-05-221-0/+2
| | | | This is instead of silently returning nothing.
* handy.h: New defn of isOCTAL_A() to free up bitKarl Williamson2012-05-221-1/+0
| | | | | | | | | | | | The new definition is likely slightly faster, as it replaces an array lookup with a mask. Comments are also added, listing the other possible candidates for this treatment, though the speed differential is unclear as they would also add an extra test. A U32 is used to store the information about the various properties for a character. This frees up one bit of that for future other use.
* mk_PL_charclass.pl: Don't use \w, \sKarl Williamson2012-05-221-3/+3
| | | | | | Now that these are partially compiled into the Perl core, we have a chicken and egg problem if one changes. Instead, use the \p{} equivalent which doesn't have this problem.
* Annihilate ‘A’ magicFather Chrysostomos2012-05-211-5/+3
| | | | | | | | | How ironic! Overloading is called ‘A’ magic internally all over the place, because of the letter used as its magic type. But now it does not even use that magic. I left a comment in mg_vtable.pl, so that future maintainers will have some clue as to what AMAGIC means.
* feature.pl: Make 5.even bundle imply 5.oddFather Chrysostomos2012-05-211-4/+6
| | | | | | Since the 5.18 feature bundle should be added long before 5.18, to avoid last-minute blunders, and since it’s easy to forget to do it in advance, have feature.pl do it automatically.
* Copy call checker when cloning closure prototypeFather Chrysostomos2012-05-211-1/+2
| | | | | Otherwise cv_set_call_checker has no effect inside an attribute han- dler for a closure.
* regen/opcodes: Rmv evalonce commentFather Chrysostomos2012-05-211-1/+0
| | | | | | | | | | | | | This goes all the way back to when perl 5.0 was being polished up. The idea behind evalonce is that eval "constant string" should be optimisable by being compiled ahead of time, just like eval { ... }. But this could never work properly, because BEGIN blocks would only fire once. Also, eval '$x .. $y' is an easy way to create two separ- ate flip-flops. There are undoubtedly many other reasons why this could never work. So there is no reason to keep this comment any longer, as it is not (or should not be) a to-do item.
* add the 5.17 feature bundleRicardo Signes2012-05-201-1/+3
|
* Tweak the FEATURE_IS_ENABLED() macro to avoid a bug in the HP-UX compiler.Nicholas Clark2012-04-121-1/+3
|
* 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().
* Patch [perl #111400] [:upper:] broken for above Latin1Karl Williamson2012-02-281-5/+25
| | | | | | | | | | | | This was an off-by-one error caused by my failing to realize that things had to be done differently at the 255/256 boundary depending on whether U+00FF matched or did not match the property. Two properties were affected, [:upper:] and [:punct:]. The bug was that all code points above the first one > 255 that legitimately matches the property will match whether or not they should. In the case of [:upper:], this meant that effectively anything from 256..infinity matched. For [:punct:], it was anything above U+037D.
* 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.
* l1_char_class_tab.h: Add field for quotemetaKarl Williamson2012-02-151-0/+3
| | | | | This changes this header to include a bit for each character indicating if it should be quoted by quotemeta under unicode_strings
* regcomp.c: /[[:lower:]]/i should match the same as /\p{Lower}/iKarl Williamson2012-02-111-1/+3
| | | | | | Same for [[:upper:]] and \p{Upper}. These were matching instead all of [[:alpha:]] or \p{Alpha}. What /\p{Lower}/i and /\p{Upper}/i match instead is \p{Cased}, and so that is what these should match.
* regcomp.c: Remove duplicate inversion listKarl Williamson2012-02-111-1/+0
| | | | | \h and \p{XPosixBlank} contain the same code points, so there is no need to have both of them.
* Add compile-time inversion lists for POSIX classesKarl Williamson2012-02-091-1/+69
| | | | | | | | | | | | | | These will be used in regcomp.c to replace the existing bit-wise handling of these, enabling subsequent optimizations. These are compiled-in, and hence affect the memory footprint of every program, including those that don't use Unicode. The lists that aren't tiny are therefore currently restricted to only the Latin1 range; anything needed beyond that will have to be read in at execution time, just as before. The design allows for easy conversion from Latin1 to use the full Unicode range, should it be deemed desirable for some or all of these.
* Add regen/mk_invlists.pl, charclass_invlists.hKarl Williamson2012-02-091-0/+83
| | | | | | | This will be used to generate compile-time inversion lists in a C hdr file that can be included in programs for initialization speed Three simple inversion lists are included in this initial commit
* warnings.pm docs: clarify categories are in perllexwarnDavid Golden2012-02-041-1/+2
|
* Implement the fc keyword and the \F string escape.Brian Fraser2012-01-292-0/+6
| | | | | | | | | | | | | | | | | | | | | | Along with the simple_casefolding and full_casefolding features. fc() stands for foldcase, a sort of pseudo case (like lowercase), which is used to implement Unicode casefolding. It maps a string to a form where all case differences are erased, so it's a locale-independent way of checking if two strings are the same, regardless of case. This functionality was, and still is, available through the regular expression engine -- /i matches would use casefolding internally. The fc keyword merely exposes this for easier access. Previously, one could attempt to case-insensitively test two strings for equality by doing lc($a) eq lc($b) But that might get you wrong results, for example in the case of \x{DF}, LATIN SMALL LETTER SHARP S.
* 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.
* Increase $warnings::VERSION to 1.13Father Chrysostomos2012-01-261-1/+1
|
* Allow ${^WARNING_BITS} to turn off lexical warningsFather Chrysostomos2012-01-261-2/+2
| | | | | | | | | | | | | | Various magical modules copy hints from one scope to another. But copying ${^WARNING_BITS} doesn’t always copy the same hints. If lexi- cal warnings are not on at all, ${^WARNING_BITS} returns a different value depending on the current value of $^W. Setting ${^WARNING_BITS} to its own value when $^W is true will stop $^W from being able to control the warnings in the current compilation scope. Setting ${^WARNING_BITS} to its own value when $^W is false causes even default warnings to be suppressed. This commit makes undef a special value that represents the default state, in which $^W controls warnings.
* Bump several file copyright datesSteffen Schwigon2012-01-191-1/+1
| | | | | | | Sync copyright dates with actual changes according to git history. [Plus run regen_perly.h to update the SHA-256 checksums, and regen/regcharclass.pl to update regcharclass.h]
* handle U suffixed unsigned int literals from regexp.hTony Cook2012-01-171-0/+4
|
* Correct links to perlsyn and perlopFather Chrysostomos2012-01-051-1/+1
|
* Explain perlguts changes in mg_vtable.pl commentFather Chrysostomos2012-01-021-1/+4
|
* Regenerate perlguts’ mg table automaticallyFather Chrysostomos2012-01-021-8/+21
| | | | | | | regen/mg_vtable.pl was modified a while ago to generate the table for copying and pasting, but at least twice since then it has not been updated properly; once by me and once by the author of that part of regen/mg_vtable.pl.
* [perl #103492] Give lvalue cx to (s)printf argsFather Chrysostomos2011-12-311-1/+1
| | | | | | | | | Or potential lvalue context, like function calls. The %n format code’s existence renders these two very much like func- tion calls, as they can modify their arguments. This allows sprintf("...%n", substr ...) to work.
* 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.
* Port regen/regen_lib.pl to 5.6.2Father Chrysostomos2011-12-241-1/+1
| | | | | | Since the regen scripts use the system perl, I thought I might as well test regen/feature.pl with 5.6.2, the earliest I have installed. It failed.
* 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
|