In perl.git, the branch smoke-me/davem/deparse has been created

<http://perl5.git.perl.org/perl.git/commitdiff/18f54f74b778c85ac7d1e878055f355d223eb226?hp=0000000000000000000000000000000000000000>

        at  18f54f74b778c85ac7d1e878055f355d223eb226 (commit)

- Log -----------------------------------------------------------------
commit 18f54f74b778c85ac7d1e878055f355d223eb226
Author: David Mitchell <[email protected]>
Date:   Mon Feb 27 08:45:08 2017 +0000

    Porting/deparse-skips.txt: add failing tests
    
    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

M       Porting/deparse-skips.txt

commit 5271aa450bffc5fa294ec60a879fdc3db2adbac3
Author: David Mitchell <[email protected]>
Date:   Fri Feb 24 20:25:18 2017 +0000

    purge Porting/deparse-skips.txt
    
    Many excluded files have since been removed, and some have been
    renamed. Update Porting/deparse-skips.txt accordingly.

M       Porting/deparse-skips.txt

commit 2c7e370eb4f87078b97ec46f1bebd322d3008bca
Author: David Mitchell <[email protected]>
Date:   Fri Feb 24 20:15:48 2017 +0000

    t/TEST: warn about unknown files deparse-skips.txt
    
    In ./TEST -deparse, when reading Porting/deparse-skips.txt, emit a warning
    for each excluded file which no longer exists.
    
    Also, move the scope of $in to just the sub that uses it.

M       t/TEST

commit 78a6e0bb35b2c293e4598c59cbd82eec64469945
Author: David Mitchell <[email protected]>
Date:   Fri Feb 24 20:00:34 2017 +0000

    deparse-skips.txt: remove cpan/File-Path/t/taint.t
    
    This was fixed a few commits ago, but I forgot to mark it fixed.

M       Porting/deparse-skips.txt

commit b24a79726bf49d263b790d3620e1353ea8a1d2d0
Author: David Mitchell <[email protected]>
Date:   Fri Feb 24 17:37:31 2017 +0000

    deparse-skips.txt: add Archive-Tar/t/03_file.t
    
    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.

M       Porting/deparse-skips.txt

commit c6eb7aa9df01967209a461ff3b3413cdbcf15a08
Author: David Mitchell <[email protected]>
Date:   Fri Feb 24 17:35:57 2017 +0000

    sort Porting/deparse-skips.txt
    
    have core test first, then cpan/dist etc. Sort alphabetically
    within each category

M       Porting/deparse-skips.txt

commit a420624c476a4f29da0ad50f9af756473357c40a
Author: David Mitchell <[email protected]>
Date:   Fri Feb 24 16:11:34 2017 +0000

    Deparse: better handle BEGIN { use_ok() }
    
    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

M       Porting/deparse-skips.txt
M       lib/B/Deparse.pm

commit e3b5b9287cf94d0467dc3864253d28b7b892edde
Author: David Mitchell <[email protected]>
Date:   Fri Feb 24 14:32:28 2017 +0000

    Deparse my var attributes correctly
    
    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

M       Porting/deparse-skips.txt
M       lib/B/Deparse.pm
M       lib/B/Deparse.t

commit cf1da93cfcd32417efb09c6fe246372f1429ab62
Author: David Mitchell <[email protected]>
Date:   Thu Feb 23 14:33:05 2017 +0000

    Deparse.pm: handle BEGIN { require expr }
    
    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

M       Porting/deparse-skips.txt
M       lib/B/Deparse.pm

commit c07aac8f33459edca41ee068ef6627ecbd8a903c
Author: David Mitchell <[email protected]>
Date:   Thu Feb 23 13:41:35 2017 +0000

    Deparse: avoid deep recursion warning
    
    sub _pessimise_walk_exe() recursively walks the optree, so can easily
    exceed a depth of 100.

M       lib/B/Deparse.pm

commit ae74861fe3db629e392d1a218886094fb491421d
Author: David Mitchell <[email protected]>
Date:   Thu Feb 23 12:52:09 2017 +0000

    t/TEST -deparse: list unexpectedly passing scripts
    
    Currently Porting/deparse-skips.txt maintains a list of test scripts
    that are expected fail when run after deparsing. If a script unexpectedly
    passes, its listed as a failure in the summary at the end of the run.
    
    Make the summary include a list of unexpected passes too to make it
    easier to distinguish from failures.

M       t/TEST

commit 33752a46e9dde5f812bfaa15aae512c5fae39f5c
Author: David Mitchell <[email protected]>
Date:   Thu Feb 23 10:53:10 2017 +0000

    Deparse: don't remove escapes for tabs in patterns
    
    In the following, the T represents a literal tab character.
    
    /\T/ and /\T/x were being deparsed as /T/ and /T/x.
    In the particular case of /\T/x that actually changed the pattern's
    meaning.
    
    So don't do that: leave the backslashes alone.
    
    This makes
        ./TEST -deparse t/re/keep_tabs.t
    pass.

M       lib/B/Deparse.pm
M       lib/B/Deparse.t

commit 2cefbcb4071d7aded6c0568e4bb9a8a55cddb238
Author: David Mitchell <[email protected]>
Date:   Thu Feb 23 10:30:42 2017 +0000

    Deparse: make a complex pattern readable with /x
    
    In sub re_unback().
    
    It shouldn't change its functionality, but just add whitespace
    and comments for readability.

M       lib/B/Deparse.pm

commit e49fec84b7c8ea4feaf038a7cd009f88d0f41430
Author: David Mitchell <[email protected]>
Date:   Wed Feb 22 16:54:51 2017 +0000

    Deparse: handle OP_PADRANGE in regex code blocks
    
    Deparse handles the OP_PADRANGE op by overlaying the view of the optree
    with the original pad ops (as if they had never been optimised into a
    single OP_PADRANGE op).
    
    However, the op treewalk to pessimise such ops wasn't walking into
    the op subtrees of code blocks in patterns. So for example
    
        /(?{ my ($x, $y) = @a; })/
    
    was being deparsed (with a warning) as
    
        /(?{ (XXX) = @a; })/
    
    With this commit, this passes again:
    
     ./TEST -deparse re/pat_re_eval.t

M       lib/B/Deparse.pm
M       lib/B/Deparse.t

commit 5446db675fe21f045aef80618c1a9dc55401fd7e
Author: David Mitchell <[email protected]>
Date:   Wed Feb 22 16:53:50 2017 +0000

    Deparse.t: diag full code that failed to compile
    
    makes it easier to debug when adding new tests that it doesn't like

M       lib/B/Deparse.t
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to