This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/perf/optree.t: remove obsolete comment
authorDavid Mitchell <davem@iabyn.com>
Sat, 7 Jan 2017 10:09:28 +0000 (10:09 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sat, 7 Jan 2017 10:09:28 +0000 (10:09 +0000)
with commit v5.25.8-172-gb243b19, I removed some special-casing of the A
in (A&&B) being in boolean context, but forgot to remove a comment
describing this special-casing.

t/perf/optree.t

index 61eefd1..f939aff 100644 (file)
@@ -205,12 +205,6 @@ is svref_2object(sub { "@_" })->ROOT->first->last->name, 'join',
 #   sub f { ....; ((%h || $x) || $y)) }
 # If f() is called in void context, then %h can return a boolean value;
 # if in scalar context, %h must return a key count.
 #   sub f { ....; ((%h || $x) || $y)) }
 # If f() is called in void context, then %h can return a boolean value;
 # if in scalar context, %h must return a key count.
-#
-# With (op && other), its ok to treat op as in bool cxt even when the &&
-# is in scalar cxt, as long as whatever op returns as a false boolean value
-# matches what it returns as a false scalar value (IV(0) in the case of
-# rv2hv etc). This is because in (A && B), A is returned only when A is
-# false.
 
 for my $ops (
     #  op       code           op path   flag         maybe flag
 
 for my $ops (
     #  op       code           op path   flag         maybe flag