| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug stemmed from Latin1 characters not matching any (non-complemented)
character class in /d semantics when the target string is no utf8; but having
unicode semantics when it isn't. The solution here is to add a special flag.
There were several tests that relied on the broken behavior, specifically they
tested that \xff isn't a printable word character even in utf8. I changed the
deparse test to instead use a non-printable code point, and I changed the ones
in re_tests to be TODOs, and will change them back using /a when that is
shortly added.
|
|
|
|
|
|
|
|
|
| |
# New Ticket Created by (Peter J. Acklam)
# Please include the string: [perl #81888]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81888 >
Signed-off-by: Abigail <abigail@abigail.be>
|
|
|
|
|
| |
Core-only modules that have changed from v5.13.7, and dual-life modules
that have changed from v5.13.7 and didn't show up in earlier passes.
|
|
|
|
|
| |
Previously it interpreted := as an empty attribute list, and issued a
deprecation warning. This change permits := to be used as a binding operator.
|
|
|
|
| |
Pass all test descriptions to Test::More. Remove one duplicated test.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also remove the documentation of OPf_SPECIAL for OP_ENTERITER, as that was only
for 5.005 threads. Stop B::Deparse misinterpreting OPf_SPECIAL on OP_ENTERITER.
|
|
|
|
| |
These are only used under 5.005threads, which was removed in 5.10.
|
|
|
|
|
| |
But note - not all its tests are parsing, and some routines will fail at runtime
due to methods missing from older Bs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactoring of the grammar around statements. New production <barestmt>
encompasses a statement without label. It includes all statement types,
including declarations, with no unnecessary intermediate non-terminals.
It generates an op tree for the statement's content, with no leading
state op. The <fullstmt> production has just one rule, consisting of
optional label followed by <barestmt>. It puts a state op on the front
of the statement's content ops.
To support the regular statement op structure, the op sequence for for(;;)
loops no longer has a second state op between the initialisation and
the loop. Instead, the unstack op type is slightly adapted to achieve
the stack clearing without a state op.
The newFOROP() constructor function no longer generates a state op,
that now being the job of the <fullstmt> production. Consequently it
no longer takes a parameter stating what label is to go in the state op.
This brings it in line with the other op constructors.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This commit makes B::Deparse support code like ‘our $ḟōō’. Currently,
an ‘our’ variable whose name is an octet sequence that does not consist
of (\w|::)+ can only be a UTF8 variable name.
When the pad is made to support UTF8 properly, this may need to
be changed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the previous commit:
$ ./perl -Ilib -MO=Deparse -e'"foo" =~ (1?/foo/:/bar/)'
'foo' =~ /foo/;
-e syntax OK
So the Deparse output no longer matches what perl does. With
this commit:
$ ./perl -Ilib -MO=Deparse -e'"foo" =~ (1?/foo/:/bar/)'
'foo' =~ ($_ =~ /foo/);
-e syntax OK
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes s/// so that it doesn't act destructively on its target.
Instead it returns the result of the substitution (or the original string if
there was no match).
In addition this patch:
* Adds a new warning when s///r happens in void context.
* Adds a error when you try to use s///r with !~
* Makes it so constant strings can be bound to s///r with =~
* Adds documentation.
* Adds some tests.
* Updates various debug code so it knows about the /r flag.
* Adds some new 'r' words to B::Deparse.
|
| |
|
|
|
|
|
|
|
| |
When deparsing a nextstate op that has both a change of package (relative
to the previous nextstate) and a label, the package declaration must be
emitted first, because it is syntactically impermissible for a label to
prefix a package declaration.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An optimisation for %hash in boolean context, as introduced with
867fa1e2da145229b4db2c6e8d5b51700c15f114
could falsely optimise constructs that shoudn't be.
Original bug report and fix suggestion were by Goro Fuji.
Include a test to cover the case which was mis-optimised (although
coverage still seems low to me).
Additionally correct B::Deparse (just swap a line, it was using a
variable before it was defined).
|
|
|
|
| |
(was missing from 0fa4a26596a4646f9aae1dcd199a2f30933e6f01)
|
|
|
|
|
|
|
|
|
|
|
| |
The code was added in 5.11.0 by
2990415a4519bc3988d7224ae15100c3e9e901ee
805b10112885d8868f21f8e860792d65e1e6c19d
but causes a big slowdown on most deparsing, due to the need
to walk the entire package tree looking for constant subs.
For more details, see
[perl #73052] Storable considerably slower at storing coderefs
|
|
|
|
|
|
|
|
|
| |
It's better to just silence it in Deparse rather than stopping
B::PMOP::reflags from returning undef because of a non-constant regexp.
That way, we keep the possibility to test for this situation, and it stays
in line with B::PMOP::pregcomp.
Also bump $B::Deparse::VERSION.
|
|
|
|
| |
And bump the $VERSION.
|
|
|
|
|
|
|
|
|
|
|
| |
An accident of Perl's parser meant that my $pi := 4; was parsed as an empty
attribute list. Empty attribute lists are ignored, hence the above is
equivalent to my $pi = 4; However, the fact that it is currently valid syntax
means that := cannot be used as new token, without silently changing the
meaning of existing code.
Hence it is now deprecated, so that it can subsequently be removed, allowing
the possibility of := to be used as a new token with new semantics.
|
|
|
|
|
|
|
|
|
| |
Part of "[PATCH] Make if (%hash) {} act the same as if (keys %hash) {}"
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-11/msg00432.html
which evolved from the approach described in the subject, to instead add a new
opcode pp_boolkeys, to exactly preserve the existing behaviour.
Plus a $VERSION bump.
|
|
|