summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2021-06-15 14:29:15 +0100
committerPaul Evans <leonerd@leonerd.org.uk>2021-06-16 18:16:24 +0100
commitec40a6635e1950d840b0d5925b78751a390959da (patch)
tree25fccdedb1355112241af51cf6197c8a0c608396 /op.c
parent78f044cf3c081ec5840ad6e07cf2e3d33f2c227e (diff)
downloadperl-ec40a6635e1950d840b0d5925b78751a390959da.tar.gz
Rename scalarseq() to a somewhat more meaningful voidnonfinal()
Diffstat (limited to 'op.c')
-rw-r--r--op.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/op.c b/op.c
index 9830c1a7e8..bab8de6317 100644
--- a/op.c
+++ b/op.c
@@ -2611,9 +2611,10 @@ Perl_list(pTHX_ OP *o)
} /* while */
}
+/* apply void context to non-final ops of a sequence */
static OP *
-S_scalarseq(pTHX_ OP *o)
+S_voidnonfinal(pTHX_ OP *o)
{
if (o) {
const OPCODE type = o->op_type;
@@ -5721,7 +5722,7 @@ OP*
Perl_block_end(pTHX_ I32 floor, OP *seq)
{
const int needblockscope = PL_hints & HINT_BLOCK_SCOPE;
- OP* retval = scalarseq(seq);
+ OP* retval = voidnonfinal(seq);
OP *o;
/* XXX Is the null PL_parser check necessary here? */
@@ -10937,8 +10938,8 @@ Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
block = CvLVALUE(compcv)
|| (cv && CvLVALUE(cv) && !CvROOT(cv) && !CvXSUB(cv))
? newUNOP(OP_LEAVESUBLV, 0,
- op_lvalue(scalarseq(block), OP_LEAVESUBLV))
- : newUNOP(OP_LEAVESUB, 0, scalarseq(block));
+ op_lvalue(voidnonfinal(block), OP_LEAVESUBLV))
+ : newUNOP(OP_LEAVESUB, 0, voidnonfinal(block));
start = LINKLIST(block);
block->op_next = 0;
if (ps && !*ps && !attrs && !CvLVALUE(compcv))
@@ -11453,8 +11454,8 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
|| (cv && CvLVALUE(cv) && !CvROOT(cv) && !CvXSUB(cv)
&& (!isGV(gv) || !GvASSUMECV(gv)))
? newUNOP(OP_LEAVESUBLV, 0,
- op_lvalue(scalarseq(block), OP_LEAVESUBLV))
- : newUNOP(OP_LEAVESUB, 0, scalarseq(block));
+ op_lvalue(voidnonfinal(block), OP_LEAVESUBLV))
+ : newUNOP(OP_LEAVESUB, 0, voidnonfinal(block));
start = LINKLIST(block);
block->op_next = 0;
if (ps && !*ps && !attrs && !CvLVALUE(PL_compcv))
@@ -12273,7 +12274,7 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block)
CvFILE_set_from_cop(cv, PL_curcop);
- root = newUNOP(OP_LEAVEWRITE, 0, scalarseq(block));
+ root = newUNOP(OP_LEAVEWRITE, 0, voidnonfinal(block));
CvROOT(cv) = root;
start = LINKLIST(root);
root->op_next = 0;