| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An empty cpan/.dir-locals.el stops Emacs using the core defaults for
code imported from CPAN.
Committer's work:
To keep t/porting/cmp_version.t and t/porting/utils.t happy, $VERSION needed
to be incremented in many files, including throughout dist/PathTools.
perldelta entry for module updates.
Add two Emacs control files to MANIFEST; re-sort MANIFEST.
For: RT #124119.
|
| |
|
|
|
|
|
|
|
|
| |
S_grok_bslash_o() and S_grok_bslash_x() scan \o{...} and \x{...} in a
string, and return a UV codepoint. Some callers assume that if that
codepoint is converted into a series of utf8 bytes and re-inserted into
the string, that it will tale up less space than the original "\x{...}"
sequence. Add asserts that this is indeed so.
|
|
|
|
|
| |
The 'output_warning' param is actually used, and 'items' is not a function
argument but a local variable.
|
|
|
|
| |
It should be equivalent to \x{0}.
|
| |
|
|
|
|
| |
This warning is being output in both passes of pattern compilation
|
|
|
|
|
|
|
|
| |
Unlike ASCII platforms where \c{ evaluates to a semi-colon, and raises a
fatal error because that result is not a control character, on EBCDIC
platforms it does evaluate to a control, but we have to forbid it anyway
because unescaped "{" now is special as a part of larger sequences, and
we don't want to get the parser confused.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removing context params will save machine code in the callers of these
functions, and 1 ptr of stack space. Some of these funcs are heavily used
as mg_find*. The contexts can always be readded in the future the same way
they were removed. This patch inspired by commit dc3bf40570. Also remove
PERL_UNUSED_CONTEXT when its not needed. See removal candidate rejection
rational in [perl #122106].
-Perl_hv_backreferences_p uses context in S_hv_auxinit
commit 96a5add60f was wrong
-Perl_whichsig_sv and Perl_whichsig_pv wrongly used PERL_UNUSED_CONTEXT
from inception in commit 84c7b88cca
-in authors opinion cast_* shouldn't be public API, no CPAN grep usage,
can't be static and/or inline optimized since it is exported
-Perl_my_unexec move to block where it is needed, make Win32 block, context
free, for inlining likelyhood, private api and only 2 callers in core
-Perl_my_dirfd make all blocks context free, then change proto
-Perl_bytes_cmp_utf8 wrongly used PERL_UNUSED_CONTEXT
from inception in commit fed3ba5d6b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit also causes escaped (by a backslash) "(", "[", and "{" to be
considered literally. In the previous 2 Perl versions, the escaping was
ignored, and a (default-on) deprecation warning was raised. Now that we
have warned for 2 release cycles, we can change the meaning.of escaping
to actually do something
Warning when a literal left brace is not escaped by a backslash, will
allow us to eventually use this character in more contexts as being
meta, allowing us to extend the language. For example, the lower limit
of a quantifier could be omited, and better error checking instituted,
or things like \w could be followed by a {...} indicating some special
word character, like \w{Greek} to restrict to just Greek word
characters.
We tried to do this in v5.16, and many CPAN modules changed to backslash
their left braces at that time. However we had to back out that change
before 5.16 shipped because it turned out that escaping a left brace in
some contexts didn't work, namely when the brace would normally be a
metacharacter (for example surrounding a quantifier), and the pattern
delimiters were { }. Instead we raised the useless backslash warning
mentioned above, which has now been there for the requisite 2 cycles.
This patch partially reverts 2 patches. The first,
e62d0b1335a7959680be5f7e56910067d6f33c1f, partially reverted
the deprecation of unescaped literal left brace. The other,
4d68ffa0f7f345bc1ae6751744518ba4bc3859bd, instituted the deprecation of
the useless left-characters.
Note that, as in the original attempt to deprecate, we don't raise a
warning if the left brace is the first character in the pattern. This
is because in that position it can't be a metacharacter, so we don't
require any disambiguation, and we found that if we did raise an error,
there were quite a few places where this occurred.
|
|
|
|
|
|
|
|
| |
This meant sprinkling some PERL_UNUSED_CONTEXT invocations,
as well as stopping some functions from getting my_perl in
the first place; all of the functions in the latter category
are internal (S_ prefix and s or i in embed.fnc), so
this should be both safe and economical.
|
|
|
|
|
|
| |
We output the message when there is a printable ASCII character, so use
that as the test instead of complementing the test for a control. This
makes the code somewhat clearer.
|
|
|
|
| |
It had been deprecated, scheduled to be removed in 5.22.
|
|
|
|
| |
These have been deprecated since v5.14.
|
|
|
|
| |
Outdent code whose surrounding block was removed by the previous commit
|
|
|
|
|
| |
These constructs have been deprecated since v5.14 with the intention of
making them fatal in 5.18. This wasn't done; and is being done now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are three pairs of characters that Perl recognizes as
metacharacters in regular expression patterns: {}, [], and (). These
can be used as well to delimit patterns, as in:
m{foo}
s(foo)(bar)
Since they are metacharacters, they have special meaning to regular
expression patterns, and it turns out that you can't turn off that
special meaning by the normal means of preceding them with a backslash,
if you use them, paired, within a pattern delimitted by them. For
example, in
m{foo\{1,3\}}
the backslashes do not change the behavior, and this matches "f", "o"
followed by one to three more occurrences of "o".
Usages like this, where they are interpreted as metacharacters, are
exceedingly rare; we think there are none, for example, in all of CPAN.
Hence, this deprecation should affect very little code. It does give
notice, however, that any such code needs to change, which will in turn
allow us to change the behavior in future Perl versions so that the
backslashes do have an effect, and without fear that we are silently
breaking any existing code.
=head1 Performance Enhancements
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was discussed in thread
http://perl.markmail.org/thread/avtzvtpzemvg2ki2
but I never got around to this portion of the consensus, until now.
I did a cpan grep
http://grep.cpan.me/?q=%28^|[^\\]%29\\[0-7]{1%2C2}[8-9]&page=1
and eyeballing the results, saw three cases where this warning might
show up; one of which was for EBCDIC. The others looked to be false
positives, such as in .css files.
|
|
|
|
|
|
|
|
| |
If a hex or octal number is too big to fit in a 32 bit word, grok_oct
and grok_hex by default output a warning that it is a non-portable
value. This new parameter to the grok_bslash functions can cause them
to shut up those warnings. This is currently unused, but will be needed
in future commits.
|
|
|
|
|
| |
This flag bit is set in both branches of the code; it might as well be
initialized instead.
|
|
|
|
| |
This properly indents a newly-formed block
|
|
|
|
|
|
| |
This mode croaks on any iffy constructs that currently compile. It is
not currently used; documentation of the error messages will be
delivered later.
|
|
|
|
|
|
|
|
|
| |
These functions advance the parse pointer for the caller. The regex
code has the infrastructure to output a marker as to where the error
was. This commit simply moves the parse pointer past all the legal
digits in the input, which are likely supposed to be part of the number,
which makes it likely that the missing right brace point is just past
those.
|
|
|
|
|
|
| |
By passing the address of the parse pointer, the functions can advance
it, eliminating a parameter to the function, and simplifying the code in
the caller.
|
|
|
|
| |
The latter is more clearly named to indicate it includes the underscore.
|
|
|
|
|
|
|
|
| |
principally, proto.h was sometimes being included twice - once before
a fn decl, and once after - giving rise to a 'decl after def' warning.
Also, S_croak_memory_wrap was declared static in every source file, but
not used in some. So selectively disable the unused-function warning.
|
|
|
|
|
|
|
| |
This finishes the removal of register declarations started by
eb578fdb5569b91c28466a4d1939e381ff6ceaf4. It neglected the ones in
function parameter declarations, and didn't include things in dist, ext,
and lib, which this does include
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There are three places that process \x. These can and did get out of
sync. This moves all three to use a common static inline function so
that they all do the same thing on the same inputs, and their behaviors
will not drift apart again.
This commit should not change current behavior. A previous commit
was designed to bring all three to identical behavior.
|
|
|
|
|
|
|
| |
This was and is a no-op on ASCII platforms, but on EBCDIC, when you did
e.g., a \o{7}, it would convert that to a 127. But it did not do this
on a \007, giving inconsistent results. Now, \o{7} yields 7, and thus
is consistent, and matches the documentation.
|
|
|
|
|
| |
This updates the editor hints in our files for Emacs and vim to request
that tabs be inserted as spaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Actually I can't see any reason it actually *needs* thread context,
but 881ffab65cdbee2f146ada660e5593bad2e71472 added thread context
to the prototype without adding it to the function definition, thus
breaking builds with -Dusethreads.
|
|
|
|
| |
Change the regcurly definition to use the new inline abilities.
|
|
|
|
| |
As previously written, a test was executed unnecessarily
|
|
This patch extracts regcurly from regcomp.c and converts it
to a static inline function in a new file dquote_static.c
that is now #included by regcomp.c and toke.c. This change
will require 'make regen'.
|