| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
And also to_uni_fold().
The flag allows retrieving either simple or full folds.
The interface is subject to change, so these are marked experimental
and their names begin with underscore. The old versions are turned
into macros calling the new versions with the correct extra parameter.
|
|
|
|
|
|
|
| |
Code within the function doesn't assume that the parameter is non-null,
and in fact the specials are retrieved by swash_init(). Having the
parameter null just means that no specials will be retrieved in the
current call.
|
|
|
|
| |
See ticket #80626.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is further work along the lines in RT #85964 and commit
af302e7fa58415c2d8454c8cbef7bccd8b504257. It reverts, for the the most
part, commits aa19b56b2f07e9eabf57540f00d312d8093e9d28 (Remove unused
parameter) and c613755a4b4fc8e64a77639d47d7e208fee68edc (/l in synthetic
start class).
Those commits caused the synthetic start class to often be marked as
matching under locale rules, even if there was no part of the regular
expression that used locale. This led to RT #85964, which made apparent
that there were a number of assumptions in the optimizer about locale
that were no longer necessarily true. This new commit changes things so
that locale has to be somewhere in the regex in order to get the
synthetic start class to include /l. In other words, this reverts the
effect of those commits to regular expression which have /l -- we go
back to the old way of doing things for non-locale regexes. This limits
any bugs that may have been introduced by the addition of /l (and being
able to match only sub-parts of a regex under locale) to the relatively
uncommon regexes which actually use it. There are a number of bugs
that have surfaced for the locale rules regexes that have gone
unreported; and some say locale rules regexes should be deprecated.
|
|
|
|
|
| |
This reverts commit c45df5a16bb5a26a06275cc63f2c3e6b1d708184.
The parameter is about to be put back in.
|
|
|
|
| |
This silences a compiler warning
|
|
|
|
| |
This silences a compiler warning
|
|
|
|
| |
This silences a compiler warning
|
|
|
|
|
| |
These two functions now have identical code, so merge them, but use
a macro in case they ever need to diverge again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A side-effect of change 3185893b8dec1062 was to force av in S_incpush() to be
NULL, whilst other flag variables were still set as if it were non-NULL, for
certain cases, only when compiled with -DPERL_IS_MINIPERL
The "obvious" fix is to also set all the flag variables to 0 under
-DPERL_IS_MINIPERL, to make everything consistent. However, this confuses (at
least) the local version of gcc, which issues warnings about passing a NULL
value (av, known always to be NULL) as a not-NULL parameter, despite the fact
that all the relevant calls are inside blocks which are actually dead code,
due to the if() conditions being const variables set to 0 under
-DPERL_IS_MINIPERL.
So to avoid future bug reports about compiler warnings, the least worst thing
to do seems to be to use #ifndef to use the pre-processor to eliminate the
dead code, and related variables.
|
|
|
|
|
|
| |
A pointer to the list of multi-char folds in an ANYOF node is now passed
to the routines that set the bit map. This is in preparation for those
routines to add to the list
|
|
|
|
|
| |
This is just an inline shorthand when a single code point is all that is
needed. A macro could have been used instead, but this just seemed nicer.
|
|
|
|
| |
A future commit uses this same code, so put it into a common place.
|
|
|
|
|
|
|
| |
Change the function add_range_to_invlist() to accept NULL as the
inversion list, in which case it creates it. A common usage of this
function is to create the list if it doesn't exist before calling it, so
this just makes that code once.
|
|
|
|
|
|
|
|
|
|
| |
Previously this used a home-grown definition of an identifier start,
stemming from a bug in some early Unicode versions. This led to some
problems, fixed by #74022.
But the home-grown solution did not track Unicode, and allowed for
characters, like marks, to begin words when they shouldn't. This change
brings this macro into compliance with Unicode going-forward.
|
|
|
|
|
| |
The parameter doesn't do anything yet. The old version becomes a macro
calling the new version with 0 as the flags.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Throughout 5.13 there was temporary code to deprecate and forbid
certain values of X following a \c in qq strings. This patch fixes
this to the final 5.14 semantics.
These are:
1) a utf8 non-ASCII character will croak. This is the same
behavior as pre-5.13, but it gives a correct error message, rather than
the malformed utf8 message previously.
2) \c{ and \cX where X is above ASCII will generate a deprecated
message. The intent is to remove these capabilities in 5.16. The
original agreement was to croak on above ASCII, but that does violate
our stability policy, so I'm deprecating it instead.
3) A non-deprecated warning is generated for all other \cX; this is the
same as throughout the 5.13 series.
I did not have the tuits to use \c{} as I had planned in 5.14, but \N{}
can be used instead.
|
|
|
|
| |
No other changes were made
|
|
|
|
|
|
| |
This function is only used in the same places as dquote_static.c is
used, so move it there, and we won't have to worry about changing its
API will break something. No other changes made
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Going forward the intent is to convert from swashes to the better-suited
inversion list data structure. This adds rudimentary inversion lists that have
only the functionality needed for 5.14. As a result, they are as much as
possible static to one file.
What's necessary for 5.14 is enough to allow folding of ANYOF nodes to be moved
from regexec to regcomp. Why they are needed for that is to generate as
compact as possible class definitions; otherwise, very long linear lists might
be generated. (They still may be, but that's inherent in the problem domain;
this generates as compact as possible, combining overlapping ranges, etc.)
The only two non-trivial methods in this object are from published algorithms.
|
|
|
|
| |
Change the regcurly definition to use the new inline abilities.
|
|
|
|
|
|
|
|
| |
As it and Perl_yylex() both need FEATURE_IS_ENABLED, feature_is_enabled() is
no longer static, and the two macro definitions move from toke.c to perl.h
Previously, one had to cut and paste the output of perl_keywords.pl into the
middle of toke.c, and it was not clear that it was generated code.
|
|
|
|
|
|
|
|
|
|
| |
All users of close_and_rename() were printing out the appropriate "ex: set ro:"
string to the file handle immediately before closing it. So move that into
the common function and rename it to reflect what it now does. [Except
overload.pl, which should have been, given that it calls read_only_top()]
Print a newline above the "ex: set ro:" line. This removes many newlines from
the regen scripts, but does add newlines to a couple of generated files.
|
|
|
|
|
|
|
|
|
| |
Previously all the scripts in regen/ had code to generate header comments
(buffer-read-only, "do not edit this file", and optionally regeneration
script, regeneration data, copyright years and filename).
This change results in some minor reformatting of header blocks, and
standardises the copyright line as "Larry Wall and others".
|
|
|
|
|
|
|
| |
This new function looks for problematic code points on output, and warns if any
are found, returning FALSE as well.
What it warns about may change, so is marked as experimental.
|
|
|
|
|
|
|
| |
It now generates prototypes for all functions that implement OPs. Hence
Perl_unimplemented_op no longer needs a special-case prototype. As it is now
generating a prototype for Perl_do_kv, no need for regen/embed.pl to duplicate
this. Convert the last two users of the macro do_kv() to Perl_do_kv(aTHX).
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13
locations that relied on them.
regen/opcode.pl now generates prototypes for the PP functions directly, into
pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads
this, removing the only ordering dependency in the regen scripts. opcode.pl
is now responsible for prototypes for pp_* functions. (embed.pl remains
responsible for ck_* functions, reading from regen/opcodes)
|
|
|
|
| |
It can be used for (at least) the call to "SPLICE" from pp_splice.
|
| |
|
|
|
|
|
| |
Previously they were combined into one numeric value, using a bitshift. This
was a false economy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
do_clean_objs only looks for objects referenced by RVs, so blessed
array references and lexical variables (and probably other SVs, too)
are not DESTROYed.
This commit adds a new visit() call to sv_clean_objs, which curses
(DESTROYs and un-blesses, leaving the reference count as it is) any
objects that are still left after do_clean_named_io_objs. The new
do_curse routine (a pointer to which is passeds to visit()) follows
do_clean_named_io_objs’ example and explicitly skips the STDOUT and
STDERR handles, in case destructors need to use them.
The cursing code, which is now called from two places, is moved out of
sv_clear and put in its own routine. The check that the reference
count is zero does not apply when called from sv_clean_objs, so the
new S_curse routine takes a boolean argument that determines whether
that check should take place.
|
| |
|
| |
|
|
|
|
|
| |
Previously Perl_report_evil_fh()'s body was just an if/else at the top level -
a good sign that it is actually implementing two disjoint functions.
|
|
|
|
| |
It was never part of the public API, and only ever used by pp_{s,}cho{,m}p.
|
|
|
|
|
|
| |
They share code for dealing with PVAVs, PVHVs, read only values and handling
PL_encoding. They are not part of the public API, and Google codesearch shows
no users outside the core.
|
|
|
|
| |
Pass in an SV to hold the count, rather than returning the count.
|
|
|
|
|
|
| |
New API functions parse_fullexpr(), parse_listexpr(), parse_termexpr(),
and parse_arithexpr(), to parse an expression at various precedence
levels.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This function compares two non-utf8 strings to see if they are
equivalent without regards to case differences. It does not work nor
check for three problematic code points that require special handling:
MICRO_SIGN, LATIN_SMALL_LETTER_SHARP_S, and
LATIN_SMALL_LETTER_Y_WITH_DIAERESIS.
make regen required
|
| |
|
|
|
|
|
|
|
|
|
| |
It attempted to provide an API to compile code down to an optree, but failed
to bind correctly to lexicals in the enclosing scope. It's not possible to
fix this problem within the constraints of its parameters and return value.
Searches suggest +that nothing on CPAN is using it, so removing it should have
zero impact.
|
|
|
|
|
|
|
|
|
|
|
|
| |
See the test case in the commit. It passes in 5.8.x and blead (as of
this commit), but not 5.10-5.13.7.
In every case the name to be passed to mro_gather_and_rename is cre-
ated using an SV, so we might as well pass that instead of extracting
the char array and length from it.
That allows us to pass an AV instead, if there are multiple names to
take into account.
|
|
|
|
|
| |
We will need this for making the API UTF8-aware in 5.16
or whenever.
|
|
|
|
| |
Nothing is using this any more, as of the previous commit.
|
|
|
|
|
|
|
| |
Add flags param to hv_undef.
There is no mathom, as the changes that this will support
are by no means suitable for maint.
|