From 07f3cdf531981dab87affaed2b19fbce13486783 Mon Sep 17 00:00:00 2001 From: Vincent Pit Date: Tue, 9 Sep 2008 00:10:34 +0200 Subject: Re: 'if not / unless' optimization change makes my pow test go POW! Message-ID: <48C586BA.4050603@profvince.com> Date: Mon, 08 Sep 2008 22:10:34 +0200 p4raw-id: //depot/perl@34322 --- ext/B/t/deparse.t | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'ext/B') diff --git a/ext/B/t/deparse.t b/ext/B/t/deparse.t index f28c68821a..42d50ba28b 100644 --- a/ext/B/t/deparse.t +++ b/ext/B/t/deparse.t @@ -434,6 +434,7 @@ use constant H => { "#" => 1 }; H->{"#"} foreach my $i (@_) { 0 } #### # 58 tests with not, not optimized +my $c; x() unless $a; x() if not $a and $b; x() if $a and not $b; @@ -443,18 +444,46 @@ x() if not $a or $b; x() if $a or not $b; x() unless not $a or $b; x() unless $a or not $b; +x() if $a and not $b and $c; +x() if not $a and $b and not $c; +x() unless $a and not $b and $c; +x() unless not $a and $b and not $c; +x() if $a or not $b or $c; +x() if not $a or $b or not $c; +x() unless $a or not $b or $c; +x() unless not $a or $b or not $c; #### # 59 tests with not, optimized +my $c; x() if not $a; x() unless not $a; x() if not $a and not $b; x() unless not $a and not $b; x() if not $a or not $b; x() unless not $a or not $b; +x() if not $a and not $b and $c; +x() unless not $a and not $b and $c; +x() if not $a or not $b or $c; +x() unless not $a or not $b or $c; +x() if not $a and not $b and not $c; +x() unless not $a and not $b and not $c; +x() if not $a or not $b or not $c; +x() unless not $a or not $b or not $c; +x() unless not $a or not $b or not $c; >>>> +my $c; x() unless $a; x() if $a; x() unless $a or $b; x() if $a or $b; x() unless $a and $b; -x() unless not $a && $b; +x() if $a and $b; +x() if not $a || $b and $c; +x() unless not $a || $b and $c; +x() if not $a && $b or $c; +x() unless not $a && $b or $c; +x() unless $a or $b or $c; +x() if $a or $b or $c; +x() unless $a and $b and $c; +x() if $a and $b and $c; +x() unless not $a && $b && $c; -- cgit v1.2.1