| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ext/B/t/optree_for.t is a new test script which gets upset when
for (...) {}
gets deparsed as
for (...) { (); }
which produces a subtly different optree.
So mark it as known failing for now.
t/op/not.t was a skip, but seems to have been succeeding for while, so
remove it from the skips file.
|
|
|
|
|
|
| |
v5.35.5-35-g6853e8af3b made some big changes to the various big math test
files. Update the Deparse test skip list to account for all the test
file renames, changes etc.
|
|
|
|
|
|
|
|
| |
That test file now works under 'TEST -deparse'.
The problematic test was removed by v5.35.2-29-gbbeb277521 -
something to do with constant-folded packed strings getting utf8
encoded.
|
|
|
|
|
|
|
|
|
| |
On non-VMS platforms, the cpan/ExtUtils-MakeMaker/t/MM_VMS.t test script
does a plan('skip_all') in a BEGIN block, which stops the rest of the
test file from being compiled. It doesn't matter so much that the rest
of the test file doesn't appear appear in the Deparse output (since we
don't want to execute it anyway); but recently, @Methods was changed to
be a lexical variable, and its 'my' declaration isn't being output.
|
|
|
|
|
|
|
|
|
| |
autodie tests generally fail the 'deparse and run the test file'
round trip due to stringified references in %^H. Add this newish test
file to the list of excluded test files.
Also add a comment to the file explaining why most autodie tests are
excluded.
|
|
|
|
|
|
| |
autodie tests generally fail the 'deparse and run the test file'
round trip due to stringified references in %^H. Add this newish test
file to the list of excluded test files.
|
|
|
|
|
|
|
|
| |
Remove 3 test scripts from the list which were expected to fail under
'TEST -deparse', but which now succeed.
This is likely to be due to unrelated changes to those scripts rather
than any specific bug fixes in Deparse.pm itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(\my @a)->$#*
was being deparsed as
$#{\my @a}
which incorrectly reduced the scope of the lexical @a.
Make Deparse.pm recognise this case and use the new postfix notation
instead.
This fixes
./TEST -deparse op/array.t
which was using ->$#*.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two test scripts are newly failing under
./TEST -deparse
op/array.t
there are two issues:
1)
\our @a
is getting deparsed as
\our (@a)
and so being misinterpreted as refgen rather than srefgen
2)
->$#*
isn't deparsed, so
(\my @a)->$#*
gets deparsed as
$#{\my @a}
with an incorrect scope for the my delcaration
lib/Config.t
for some reason, some functions from ./lib/Config_heavy.pl
are being output as part of lib/Config.t, and so things
like strict throw a wobbly.
Not sure yet why its happening
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the last update (Jun 2017), one test script has stopped passing
under 't/TEST -deparse':
../cpan/Test-Simple/t/Legacy/no_plan.t
due to hard-code expected line numbers in tests for warning messages;
while the following test scripts have started passing:
../cpan/Socket/t/sockaddr.t
../dist/IO/t/io_sel.t
../dist/PathTools/t/cwd.t
../dist/Storable/t/blessed.t
../ext/B/t/xref.t
../lib/Benchmark.t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the 27 currently unexpected failing tests to the 'known failing' list
in deparse-skips.txt. These most likely represent newer or modified test
scripts which tickle existing Deparse issues rather than regressions in
Deparse, but I haven't examined them to check.
By adding them in, we're kind of resetting the clock - perhaps in future
we won't allow new failures to appear.
There are now 174 known failing scripts out of 2555. At the start of this
branch there were 178 known failing and 84 unexpectedly failing scripts.
In 5.24.0 there were 207 known failing and 174 unexpectedly failing scripts.
Also, re-sort the list.
The following were added to to deparse-skips.txt by this commit:
../cpan/Module-Metadata/t/metadata.t
../cpan/Scalar-List-Utils/t/subname.t
../cpan/Scalar-List-Utils/t/uniq.t
../cpan/Term-Cap/test.pl
../cpan/Test-Simple/t/Test2/behavior/run_subtest_inherit.t
../cpan/Test-Simple/t/regression/684-nested_todo_diag.t
../cpan/autodie/t/basic_exceptions.t
../cpan/autodie/t/binmode.t
../cpan/autodie/t/fileno.t
../cpan/autodie/t/mkdir.t
../cpan/autodie/t/read.t
../cpan/autodie/t/truncate.t
../cpan/autodie/t/unlink.t
../cpan/bignum/t/biinfnan.t
../cpan/bignum/t/bninfnan.t
../cpan/bignum/t/brinfnan.t
../dist/Data-Dumper/t/trailing_comma.t
../dist/threads/t/blocks.t
../ext/XS-APItest/t/synthetic_scope.t
../lib/Benchmark.t
../lib/dumpvar.t
mro/basic_01_c3_utf8.t
mro/basic_01_dfs_utf8.t
mro/complex_c3_utf8.t
op/hexfp.t
op/lvref.t
uni/variables.t
|
|
|
|
|
| |
Many excluded files have since been removed, and some have been
renamed. Update Porting/deparse-skips.txt accordingly.
|
|
|
|
| |
This was fixed a few commits ago, but I forgot to mark it fixed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test script uses constant anon subs, which get deparsed back
into real subs and fail; e.g.
use strict;
{ my $x; use constant FOO => sub { $x = 1 }; }
FOO->();
which gets deparsed as
use strict;
{ my $x; use constant FOO => sub { $x = 1 }; }
sub { $x = 1 }->();
and croaks with 'Global symbol "$x" requires explicit package name'
Since the name of the constant ('FOO') has been folded away, there's
no way to correctly deparse this unless more info is saved in the op tree.
|
|
|
|
|
| |
have core test first, then cpan/dist etc. Sort alphabetically
within each category
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit v5.25.3-111-g8071973 added handling for the bad deparsing of
BEGIN { use_ok() }
Basically by stripping out the bad code text *after* it had been deparsed.
However, this didn't catch all bad cases - in particular, where #line
directives got added:
use Socket (@{
#line 10 "t/000_load.t"
$args[0];});
Under TEST -deparse, this fixes the following unexpectedly failing
scripts:
../cpan/Term-ANSIColor/t/taint/basic.t
../cpan/autodie/t/00-load.t
../dist/Locale-Maketext/t/01_about_verbose.t
../dist/Locale-Maketext/t/10_make.t
../dist/Locale-Maketext/t/20_get.t
../dist/Locale-Maketext/t/40_super.t
../dist/Locale-Maketext/t/50_super.t
../dist/Locale-Maketext/t/60_super.t
../dist/Locale-Maketext/t/70_fail_auto.t
../dist/Locale-Maketext/t/91_backslash.t
../ext/File-Glob/t/taint.t
../ext/Hash-Util/t/Util.t
../lib/DB.t
../lib/File/Basename.t
and fixes the following expected-to-fail script:
../dist/Net-Ping/t/000_load.t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Formerly this:
my $x :foo;
deparsed as
'attributes'->import('main', \$x, 'foo'), my $x;
it now deparses as:
my $x :foo;
It handles all the common forms, such as
my Foo::Bar ($s, @a, %h) :foo(foo1) bar(bar1);
but doesn't yet handle an attribute declaration that's not a statement,
e.g.
f(1, $x :foo);
Under TEST -deparse, this fixes the following unexpectedly failing
scripts:
../dist/IO/t/io_file_export.t
../dist/IO/t/io_multihomed.t
../dist/IO/t/io_udp.t
../dist/Thread-Queue/t/02_refs.t
../dist/Thread-Semaphore/t/01_basic.t
../dist/Thread-Semaphore/t/04_nonblocking.t
../dist/Thread-Semaphore/t/05_force.t
../dist/Thread-Semaphore/t/06_timed.t
../dist/threads-shared/t/av_refs.t
../dist/threads-shared/t/blessed.t
../dist/threads-shared/t/clone.t
../dist/threads-shared/t/cond.t
../dist/threads-shared/t/dualvar.t
../dist/threads-shared/t/hv_refs.t
../dist/threads-shared/t/object.t
../dist/threads-shared/t/object2.t
../dist/threads-shared/t/shared_attr.t
../dist/threads-shared/t/sv_refs.t
../dist/threads-shared/t/utf8.t
../dist/threads-shared/t/wait.t
../dist/threads-shared/t/waithires.t
../dist/threads/t/err.t
../dist/threads/t/free.t
../dist/threads/t/join.t
../dist/threads/t/kill.t
../dist/threads/t/kill2.t
../dist/threads/t/libc.t
../dist/threads/t/problems.t
../dist/threads/t/state.t
op/threads-dirh.t
and fixes the following expected-to-fail scripts:
../dist/Thread-Queue/t/08_nothreads.t
../dist/threads/t/exit.t
../dist/threads/t/thread.t
op/attrs.t
op/getpid.t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deparse examines BEGIN subs to see if they look like
BEGIN { require Foo; ... }
and if so deparses them as 'use Foo' instead.
However, it can't cope when Foo is an expression rather than a constant,
such as
BEGIN {
require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
}
and crashes.
This commit makes it instead recognise such op trees as not being part of
a 'use'.
Under TEST -deparse, this fixes the following unexpectedly failing
script:
dist/threads/t/kill3.t
and fixes the following expected-to-fail scripts:
dist/IO/t/io_file_export.t
dist/IO/t/io_multihomed.t
dist/IO/t/io_udp.t
dist/threads/t/err.t
dist/threads/t/kill2.t
dist/threads/t/libc.t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most ops that execute a regex, such as match and subst, are of type PMOP.
A PMOP allows the actual regex to be attached directly to that op, due
to its extra fields.
OP_SPLIT is different; it is just a plain LISTOP, but it always has an
OP_PUSHRE as its first child, which *is* a PMOP and which has the regex
attached.
At runtime, pp_pushre()'s only job is to push itself (i.e. the current
PL_op) onto the stack. Later pp_split() pops this to get access to the
regex it wants to execute.
This is a bit unpleasant, because we're pushing an OP* onto the stack,
which is supposed to be an array of SV*'s. As a bit of a hack, on
DEBUGGING builds we push a PVLV with the PL_op address embedded instead,
but this still isn't very satisfactory.
Now that regexes are first-class SVs, we could push a REGEXP onto the
stack rather than PL_op. However, there is an optimisation of @array =
split which eliminates the assign and embeds the array's GV/padix directly
in the PUSHRE op. So split still needs access to that op. But the pushre
op will always be splitop->op_first anyway, so one possibility is to just
skip executing the pushre altogether, and make pp_split just directly
access op_first instead to get the regex and @array info.
But if we're doing that, then why not just go the full hog and make
OP_SPLIT into a PMOP, and eliminate the OP_PUSHRE op entirely: with the
data that was spread across the two ops now combined into just the one
split op.
That is exactly what this commit does.
For a simple compile-time pattern like split(/foo/, $s, 1), the optree
looks like:
before:
<@> split[t2] lK
</> pushre(/"foo"/) s/RTIME
<0> padsv[$s:1,2] s
<$> const(IV 1) s
after:
</> split(/"foo"/)[t2] lK/RTIME
<0> padsv[$s:1,2] s
<$> const[IV 1] s
while for a run-time expression like split(/$pat/, $s, 1),
before:
<@> split[t3] lK
</> pushre() sK/RTIME
<|> regcomp(other->8) sK
<0> padsv[$pat:2,3] s
<0> padsv[$s:1,3] s
<$> const(IV 1)s
after:
</> split()[t3] lK/RTIME
<|> regcomp(other->8) sK
<0> padsv[$pat:2,3] s
<0> padsv[$s:1,3] s
<$> const[IV 1] s
This makes the code faster and simpler.
At the same time, two new private flags have been added for OP_SPLIT -
OPpSPLIT_ASSIGN and OPpSPLIT_LEX - which make it explicit that the
assign op has been optimised away, and if so, whether the array is
lexical.
Also, deparsing of split has been improved, to the extent that
perl TEST -deparse op/split.t
now passes.
Also, a couple of panic messages in pp_split() have been replaced with
asserts().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the summary output of
cd t; ./perl TEST -deparse
it doesn't distinguish between test scripts expected to pass that fail,
and those expected to fail that succeed. They're all listed as failures.
So I've just removed 5 further entries from deparse-skips.txt that I
hadn't noticed were passing. I don't know when they first started
unexpectedly passing.
It's down to 78 unexpected failures now. Not good, since a couple of
years ago there were no unexpected failures, but at least its down from
the 194 at the start of this branch. The entries in deparse-skips.txt
have also reduced by about 28 over the course of this branch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code like
BEGIN {use_ok 'Net::Ping'};
got deparsed as:
BEGIN {use_ok 'Net::Ping'};
use Net::Ping (@{$args[0];});
This is due to the tricks it plays faking up and evaling a use statement.
This commit filters out these spurious 'use's in the Deparse output.
With this commit, 109 'TEST -deparse' tests that were expected to pass
but had been failing for some time, now pass; and 22 tests that were
expected to fail, now pass.
I also removed the entry for lib/Switch/t/ in Porting/deparse-skips.txt,
since Switch is no longer bundled.
|
|
|
|
|
|
|
|
| |
when 'use feature "signatures"' is in scope, subroutine prototypes
should be deparsed as ':prototype($$)' rather than '($$)'
I've also tweaked the sub in question slightly to make adding
signature deparsing easier later on.
|
|
|
|
|
|
|
|
|
|
| |
About 270 test files formerly marked as "expected to fail under
"./TEST -deparse" now pass. We must be doing something right :-)
Remove them from the list of expected failures.
Conversely, there are also 174 failing tests that are aren't marked
as expected to fail, so we're probably doing something wrong too :-(.
|
|
|
|
|
| |
A private communication with Audrey indicated that to allow us to make
mods, this was the preferred solution.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
‘my’ list assignment with attributes. Another tricky one.
|
|
|
|
| |
This is a hard one which I don’t feel like fixing just now.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|