head	1.2;
access;
symbols
	RELENG_4_11_0_RELEASE:1.1.1.1
	RELENG_4_11:1.1.1.1.0.24
	RELENG_4_11_BP:1.1.1.1
	RELENG_4_10_0_RELEASE:1.1.1.1
	RELENG_4_10:1.1.1.1.0.22
	RELENG_4_10_BP:1.1.1.1
	RELENG_4_9_0_RELEASE:1.1.1.1
	RELENG_4_9:1.1.1.1.0.20
	RELENG_4_9_BP:1.1.1.1
	RELENG_4_8_0_RELEASE:1.1.1.1
	RELENG_4_8:1.1.1.1.0.18
	RELENG_4_8_BP:1.1.1.1
	RELENG_4_7_0_RELEASE:1.1.1.1
	RELENG_4_7:1.1.1.1.0.16
	RELENG_4_7_BP:1.1.1.1
	RELENG_4_6_2_RELEASE:1.1.1.1
	RELENG_4_6_1_RELEASE:1.1.1.1
	RELENG_4_6_0_RELEASE:1.1.1.1
	RELENG_4_6:1.1.1.1.0.14
	RELENG_4_6_BP:1.1.1.1
	v5_006_01:1.1.1.3
	RELENG_4_5_0_RELEASE:1.1.1.1
	RELENG_4_5:1.1.1.1.0.12
	RELENG_4_5_BP:1.1.1.1
	RELENG_4_4_0_RELEASE:1.1.1.1
	RELENG_4_4:1.1.1.1.0.10
	RELENG_4_4_BP:1.1.1.1
	RELENG_4_3_0_RELEASE:1.1.1.1
	RELENG_4_3:1.1.1.1.0.8
	RELENG_4_3_BP:1.1.1.1
	RELENG_4_2_0_RELEASE:1.1.1.1
	RELENG_4_1_1_RELEASE:1.1.1.1
	PRE_SMPNG:1.1.1.2
	RELENG_4_1_0_RELEASE:1.1.1.1
	v5_006:1.1.1.2
	RELENG_3_5_0_RELEASE:1.1.1.1
	RELENG_4_0_0_RELEASE:1.1.1.1
	RELENG_4:1.1.1.1.0.6
	RELENG_4_BP:1.1.1.1
	RELENG_3_4_0_RELEASE:1.1.1.1
	RELENG_3_3_0_RELEASE:1.1.1.1
	RELENG_3_2_PAO:1.1.1.1.0.4
	RELENG_3_2_PAO_BP:1.1.1.1
	RELENG_3_2_0_RELEASE:1.1.1.1
	v5_005_03:1.1.1.1
	RELENG_3_1_0_RELEASE:1.1.1.1
	RELENG_3:1.1.1.1.0.2
	RELENG_3_BP:1.1.1.1
	RELENG_3_0_0_RELEASE:1.1.1.1
	v5_005_02:1.1.1.1
	LWALL:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2002.05.16.10.07.53;	author markm;	state dead;
branches;
next	1.1;

1.1
date	98.09.09.06.59.50;	author markm;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	98.09.09.06.59.50;	author markm;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2000.06.25.11.03.06;	author markm;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2002.03.16.20.13.57;	author markm;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Perl is no longer in base. Long live the port!
@
text
@PP(pp_range)
{
    if (GIMME == G_ARRAY)
        return cCONDOP->op_true;
    return SvTRUEx(PAD_SV(op->op_targ)) ? cCONDOP->op_false : cCONDOP->op_true;
}

pp_range is a CONDOP.
In array context, it just returns op_true.
In scalar context it checks the truth of targ and returns
op_false if true, op_true if false.

flip is an UNOP.
It "looks after" its child which is always a pp_range CONDOP.
In array context, it just returns the child's op_false.
In scalar context, there are three possible outcomes:
  (1) set child's targ to 1, our targ to 1 and return op_next.
  (2) set child's targ to 1, our targ to 0, sp-- and return child's op_false.
  (3) Blank targ and  TOPs and return op_next.
Case 1 happens for a "..." with a matching lineno... or true TOPs.
Case 2 happens for a ".." with a matching lineno... or true TOPs.
Case 3 happens for a non-matching lineno or false TOPs.

               $a = lhs..rhs;

        ,------->  range
        ^         /     \
        |    true/       \false
        |       /         \
   first|     lhs        rhs
        |      \   first   /
        ^--- flip <----- flop
                 \       /
                  \     /
                  sassign


/* range */
if (SvTRUE(curpad[op->op_targ]))
    goto label(op_false);
/* op_true */
...
/* flip */
/* For "..." returns op_next. For ".." returns op_next or op_first->op_false */
/* end of basic block */
goto out;
label(range op_false):
...
/* flop */
out:
...
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Initial import of Perl5. The king is dead; long live the king!
@
text
@@


1.1.1.2
log
@Vendor import of Perl 5.006
@
text
@d4 2
a5 5
        return NORMAL;
    if (SvTRUEx(PAD_SV(PL_op->op_targ)))
	return cLOGOP->op_other;
    else
	return NORMAL;
d8 2
a9 2
pp_range is a LOGOP.
In array context, it just returns op_next.
d11 1
a11 1
op_other if true, op_next if false.
d14 2
a15 2
It "looks after" its child which is always a pp_range LOGOP.
In array context, it just returns the child's op_other.
d18 1
a18 1
  (2) set child's targ to 1, our targ to 0, sp-- and return child's op_other.
d40 2
a41 2
    goto label(op_other);
/* op_next */
d44 1
a44 1
/* For "..." returns op_next. For ".." returns op_next or op_first->op_other */
d47 1
a47 1
label(range op_other):
@


1.1.1.3
log
@Vendor import Perl 5.6.1
@
text
@d12 1
a12 1
In list context, it just returns op_next.
d18 1
a18 1
In list context, it just returns the child's op_other.
@


