diff options
-rw-r--r-- | cop.h | 10 | ||||
-rw-r--r-- | dump.c | 2 | ||||
-rw-r--r-- | embed.fnc | 8 | ||||
-rw-r--r-- | embed.h | 8 | ||||
-rw-r--r-- | ext/Opcode/Opcode.pm | 2 | ||||
-rw-r--r-- | inline.h | 12 | ||||
-rw-r--r-- | lib/B/Deparse.pm | 2 | ||||
-rw-r--r-- | lib/B/Op_private.pm | 4 | ||||
-rw-r--r-- | op.c | 22 | ||||
-rw-r--r-- | opcode.h | 26 | ||||
-rw-r--r-- | opnames.h | 4 | ||||
-rw-r--r-- | perl.h | 2 | ||||
-rw-r--r-- | perly.act | 6 | ||||
-rw-r--r-- | perly.h | 2 | ||||
-rw-r--r-- | perly.tab | 2 | ||||
-rw-r--r-- | perly.y | 4 | ||||
-rw-r--r-- | pp_ctl.c | 36 | ||||
-rw-r--r-- | pp_proto.h | 4 | ||||
-rw-r--r-- | proto.h | 14 | ||||
-rw-r--r-- | regen/opcodes | 4 | ||||
-rw-r--r-- | sv.c | 2 |
21 files changed, 88 insertions, 88 deletions
@@ -721,8 +721,8 @@ struct block_loop { -/* when context */ -struct block_when { +/* whereso context */ +struct block_whereso { OP *leave_op; }; @@ -747,7 +747,7 @@ struct block { struct block_format blku_format; struct block_eval blku_eval; struct block_loop blku_loop; - struct block_when blku_when; + struct block_whereso blku_whereso; } blk_u; }; #define blk_oldsp cx_u.cx_blk.blku_oldsp @@ -763,7 +763,7 @@ struct block { #define blk_format cx_u.cx_blk.blk_u.blku_format #define blk_eval cx_u.cx_blk.blk_u.blku_eval #define blk_loop cx_u.cx_blk.blk_u.blku_loop -#define blk_when cx_u.cx_blk.blk_u.blku_when +#define blk_whereso cx_u.cx_blk.blk_u.blku_whereso #define CX_DEBUG(cx, action) \ DEBUG_l( \ @@ -856,7 +856,7 @@ struct context { and a static array of context names in pp_ctl.c */ #define CXTYPEMASK 0xf #define CXt_NULL 0 /* currently only used for sort BLOCK */ -#define CXt_WHEN 1 +#define CXt_WHERESO 1 #define CXt_BLOCK 2 /* be careful of the ordering of these six. Macros like CxTYPE_is_LOOP, * CxFOREACH compare ranges */ @@ -1222,7 +1222,7 @@ S_do_op_dump_bar(pTHX_ I32 level, UV bar, PerlIO *file, const OP *o) case OP_DORASSIGN: case OP_ANDASSIGN: case OP_ARGDEFELEM: - case OP_ENTERWHEN: + case OP_ENTERWHERESO: case OP_ENTERTRY: case OP_ONCE: S_opdump_indent(aTHX_ o, level, bar, file, "OTHER"); @@ -1166,7 +1166,7 @@ ApdR |SV* |newSV_type |const svtype type ApdR |OP* |newUNOP |I32 type|I32 flags|NULLOK OP* first ApdR |OP* |newUNOP_AUX |I32 type|I32 flags|NULLOK OP* first \ |NULLOK UNOP_AUX_item *aux -ApdR |OP* |newWHENOP |NN OP* cond|NN OP* block +ApdR |OP* |newWHERESOOP |NN OP* cond|NN OP* block ApdR |OP* |newWHILEOP |I32 flags|I32 debuggable|NULLOK LOOP* loop \ |NULLOK OP* expr|NULLOK OP* block|NULLOK OP* cont \ |I32 has_my @@ -2230,7 +2230,7 @@ sR |I32 |dopoptoeval |I32 startingblock sR |I32 |dopoptolabel |NN const char *label|STRLEN len|U32 flags sR |I32 |dopoptoloop |I32 startingblock sR |I32 |dopoptosub_at |NN const PERL_CONTEXT* cxstk|I32 startingblock -sR |I32 |dopoptowhen |I32 startingblock +sR |I32 |dopoptowhereso |I32 startingblock s |void |save_lines |NULLOK AV *array|NN SV *sv s |bool |doeval_compile |U8 gimme \ |NULLOK CV* outside|U32 seq|NULLOK HV* hh @@ -3156,8 +3156,8 @@ AiM |void |cx_pushloop_for |NN PERL_CONTEXT *cx \ |NN void *itervarp|NULLOK SV *itersave AiM |void |cx_pushloop_given |NN PERL_CONTEXT *cx|NULLOK SV *orig_defsv AiM |void |cx_poploop |NN PERL_CONTEXT *cx -AiM |void |cx_pushwhen |NN PERL_CONTEXT *cx -AiM |void |cx_popwhen |NN PERL_CONTEXT *cx +AiM |void |cx_pushwhereso |NN PERL_CONTEXT *cx +AiM |void |cx_popwhereso |NN PERL_CONTEXT *cx #endif #ifdef USE_DTRACE @@ -425,7 +425,7 @@ #define newSVuv(a) Perl_newSVuv(aTHX_ a) #define newUNOP(a,b,c) Perl_newUNOP(aTHX_ a,b,c) #define newUNOP_AUX(a,b,c,d) Perl_newUNOP_AUX(aTHX_ a,b,c,d) -#define newWHENOP(a,b) Perl_newWHENOP(aTHX_ a,b) +#define newWHERESOOP(a,b) Perl_newWHERESOOP(aTHX_ a,b) #define newWHILEOP(a,b,c,d,e,f,g) Perl_newWHILEOP(aTHX_ a,b,c,d,e,f,g) #define newXS(a,b,c) Perl_newXS(aTHX_ a,b,c) #define newXS_flags(a,b,c,d,e) Perl_newXS_flags(aTHX_ a,b,c,d,e) @@ -792,7 +792,7 @@ #define cx_popsub(a) S_cx_popsub(aTHX_ a) #define cx_popsub_args(a) S_cx_popsub_args(aTHX_ a) #define cx_popsub_common(a) S_cx_popsub_common(aTHX_ a) -#define cx_popwhen(a) S_cx_popwhen(aTHX_ a) +#define cx_popwhereso(a) S_cx_popwhereso(aTHX_ a) #define cx_pushblock(a,b,c,d) S_cx_pushblock(aTHX_ a,b,c,d) #define cx_pusheval(a,b,c) S_cx_pusheval(aTHX_ a,b,c) #define cx_pushformat(a,b,c,d) S_cx_pushformat(aTHX_ a,b,c,d) @@ -800,7 +800,7 @@ #define cx_pushloop_given(a,b) S_cx_pushloop_given(aTHX_ a,b) #define cx_pushloop_plain(a) S_cx_pushloop_plain(aTHX_ a) #define cx_pushsub(a,b,c,d) S_cx_pushsub(aTHX_ a,b,c,d) -#define cx_pushwhen(a) S_cx_pushwhen(aTHX_ a) +#define cx_pushwhereso(a) S_cx_pushwhereso(aTHX_ a) #define cx_topblock(a) S_cx_topblock(aTHX_ a) #endif #if defined(DEBUGGING) @@ -1719,7 +1719,7 @@ #define dopoptolabel(a,b,c) S_dopoptolabel(aTHX_ a,b,c) #define dopoptoloop(a) S_dopoptoloop(aTHX_ a) #define dopoptosub_at(a,b) S_dopoptosub_at(aTHX_ a,b) -#define dopoptowhen(a) S_dopoptowhen(aTHX_ a) +#define dopoptowhereso(a) S_dopoptowhereso(aTHX_ a) #define num_overflow S_num_overflow #define path_is_searchable S_path_is_searchable #define run_user_filter(a,b,c) S_run_user_filter(aTHX_ a,b,c) diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm index ad43c5bfac..e8f429e113 100644 --- a/ext/Opcode/Opcode.pm +++ b/ext/Opcode/Opcode.pm @@ -427,7 +427,7 @@ These are a hotchpotch of opcodes still waiting to be considered entertry leavetry -- can be used to 'hide' fatal errors entergiven - enterwhen leavewhen + enterwhereso leavewhereso continue smartmatch @@ -1643,19 +1643,19 @@ S_cx_poploop(pTHX_ PERL_CONTEXT *cx) PERL_STATIC_INLINE void -S_cx_pushwhen(pTHX_ PERL_CONTEXT *cx) +S_cx_pushwhereso(pTHX_ PERL_CONTEXT *cx) { - PERL_ARGS_ASSERT_CX_PUSHWHEN; + PERL_ARGS_ASSERT_CX_PUSHWHERESO; - cx->blk_when.leave_op = cLOGOP->op_other; + cx->blk_whereso.leave_op = cLOGOP->op_other; } PERL_STATIC_INLINE void -S_cx_popwhen(pTHX_ PERL_CONTEXT *cx) +S_cx_popwhereso(pTHX_ PERL_CONTEXT *cx) { - PERL_ARGS_ASSERT_CX_POPWHEN; - assert(CxTYPE(cx) == CXt_WHEN); + PERL_ARGS_ASSERT_CX_POPWHERESO; + assert(CxTYPE(cx) == CXt_WHERESO); PERL_UNUSED_ARG(cx); PERL_UNUSED_CONTEXT; diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm index 43955a65ce..387bb1ea38 100644 --- a/lib/B/Deparse.pm +++ b/lib/B/Deparse.pm @@ -2539,7 +2539,7 @@ sub pp_lock { unop(@_, "lock") } sub pp_continue { unop(@_, "continue"); } -sub pp_leavewhen { +sub pp_leavewhereso { my($self, $op, $cx) = @_; my $whereso = $self->keyword("whereso"); my $enterop = $op->first; diff --git a/lib/B/Op_private.pm b/lib/B/Op_private.pm index 4718a25031..2e75c8067d 100644 --- a/lib/B/Op_private.pm +++ b/lib/B/Op_private.pm @@ -306,7 +306,7 @@ $bits{each}{0} = $bf[0]; @{$bits{entereval}}{5,4,3,2,1,0} = ('OPpEVAL_RE_REPARSING', 'OPpEVAL_COPHH', 'OPpEVAL_BYTES', 'OPpEVAL_UNICODE', 'OPpEVAL_HAS_HH', $bf[0]); @{$bits{entersub}}{5,4,0} = ($bf[8], $bf[8], 'OPpENTERSUB_INARGS'); $bits{entertry}{0} = $bf[0]; -$bits{enterwhen}{0} = $bf[0]; +$bits{enterwhereso}{0} = $bf[0]; @{$bits{enterwrite}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); @{$bits{eof}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); @{$bits{eq}}{1,0} = ($bf[1], $bf[1]); @@ -408,7 +408,7 @@ $bits{leaveeval}{0} = $bf[0]; @{$bits{leaveloop}}{1,0} = ($bf[1], $bf[1]); $bits{leavesub}{0} = $bf[0]; $bits{leavesublv}{0} = $bf[0]; -$bits{leavewhen}{0} = $bf[0]; +$bits{leavewhereso}{0} = $bf[0]; $bits{leavewrite}{0} = $bf[0]; @{$bits{left_shift}}{1,0} = ($bf[1], $bf[1]); $bits{length}{0} = $bf[0]; @@ -1832,7 +1832,7 @@ Perl_scalar(pTHX_ OP *o) do_kids: while (kid) { OP *sib = OpSIBLING(kid); - if (sib && kid->op_type != OP_LEAVEWHEN + if (sib && kid->op_type != OP_LEAVEWHERESO && ( OpHAS_SIBLING(sib) || sib->op_type != OP_NULL || ( sib->op_targ != OP_NEXTSTATE && sib->op_targ != OP_DBSTATE ))) @@ -1923,7 +1923,7 @@ Perl_scalarvoid(pTHX_ OP *arg) want = o->op_flags & OPf_WANT; if ((want && want != OPf_WANT_SCALAR) || (PL_parser && PL_parser->error_count) - || o->op_type == OP_RETURN || o->op_type == OP_REQUIRE || o->op_type == OP_LEAVEWHEN) + || o->op_type == OP_RETURN || o->op_type == OP_REQUIRE || o->op_type == OP_LEAVEWHERESO) { continue; } @@ -2186,7 +2186,7 @@ Perl_scalarvoid(pTHX_ OP *arg) case OP_DOR: case OP_COND_EXPR: case OP_ENTERGIVEN: - case OP_ENTERWHEN: + case OP_ENTERWHERESO: for (kid = OpSIBLING(cUNOPo->op_first); kid; kid = OpSIBLING(kid)) if (!(kid->op_flags & OPf_KIDS)) scalarvoid(kid); @@ -2210,7 +2210,7 @@ Perl_scalarvoid(pTHX_ OP *arg) case OP_LEAVETRY: case OP_LEAVELOOP: case OP_LINESEQ: - case OP_LEAVEWHEN: + case OP_LEAVEWHERESO: kids: for (kid = cLISTOPo->op_first; kid; kid = OpSIBLING(kid)) if (!(kid->op_flags & OPf_KIDS)) @@ -2350,7 +2350,7 @@ Perl_list(pTHX_ OP *o) do_kids: while (kid) { OP *sib = OpSIBLING(kid); - if (sib && kid->op_type != OP_LEAVEWHEN) + if (sib && kid->op_type != OP_LEAVEWHERESO) scalarvoid(kid); else list(kid); @@ -8787,7 +8787,7 @@ Perl_newGIVENOP(pTHX_ OP *cond, OP *block, PADOFFSET defsv_off) } /* -=for apidoc Am|OP *|newWHENOP|OP *cond|OP *block +=for apidoc Am|OP *|newWHERESOOP|OP *cond|OP *block Constructs, checks, and returns an op tree expressing a C<whereso> block. C<cond> supplies the test expression, and C<block> supplies the block @@ -8798,22 +8798,22 @@ by this function and become part of the constructed op tree. */ OP * -Perl_newWHENOP(pTHX_ OP *cond, OP *block) +Perl_newWHERESOOP(pTHX_ OP *cond, OP *block) { OP *enterop, *leaveop; - PERL_ARGS_ASSERT_NEWWHENOP; + PERL_ARGS_ASSERT_NEWWHERESOOP; NewOpSz(1101, enterop, sizeof(LOGOP)); - OpTYPE_set(enterop, OP_ENTERWHEN); + OpTYPE_set(enterop, OP_ENTERWHERESO); cLOGOPx(enterop)->op_first = scalar(cond); OpMORESIB_set(cond, block); OpLASTSIB_set(block, enterop); enterop->op_flags = OPf_KIDS; - leaveop = newUNOP(OP_LEAVEWHEN, 0, enterop); + leaveop = newUNOP(OP_LEAVEWHERESO, 0, enterop); leaveop->op_next = LINKLIST(cond); cond->op_next = enterop; - enterop = CHECKOP(OP_ENTERWHEN, enterop); + enterop = CHECKOP(OP_ENTERWHERESO, enterop); enterop->op_next = LINKLIST(block); cLOGOPx(enterop)->op_other = block->op_next = leaveop; @@ -364,8 +364,8 @@ EXTCONST char* const PL_op_name[] = { "method_redir", "method_redir_super", "entergiven", - "enterwhen", - "leavewhen", + "enterwhereso", + "leavewhereso", "continue", "open", "close", @@ -1182,8 +1182,8 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */ Perl_pp_method_redir, Perl_pp_method_redir_super, Perl_pp_entergiven, - Perl_pp_enterwhen, - Perl_pp_leavewhen, + Perl_pp_enterwhereso, + Perl_pp_leavewhereso, Perl_pp_continue, Perl_pp_open, Perl_pp_close, @@ -1593,8 +1593,8 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */ Perl_ck_null, /* method_redir */ Perl_ck_null, /* method_redir_super */ Perl_ck_null, /* entergiven */ - Perl_ck_null, /* enterwhen */ - Perl_ck_null, /* leavewhen */ + Perl_ck_null, /* enterwhereso */ + Perl_ck_null, /* leavewhereso */ Perl_ck_null, /* continue */ Perl_ck_open, /* open */ Perl_ck_fun, /* close */ @@ -2000,8 +2000,8 @@ EXTCONST U32 PL_opargs[] = { 0x00000e40, /* method_redir */ 0x00000e40, /* method_redir_super */ 0x00000940, /* entergiven */ - 0x00000340, /* enterwhen */ - 0x00000100, /* leavewhen */ + 0x00000340, /* enterwhereso */ + 0x00000100, /* leavewhereso */ 0x00000000, /* continue */ 0x0029640d, /* open */ 0x0000eb04, /* close */ @@ -2662,8 +2662,8 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { 0, /* method_redir */ 0, /* method_redir_super */ -1, /* entergiven */ - 0, /* enterwhen */ - 0, /* leavewhen */ + 0, /* enterwhereso */ + 0, /* leavewhereso */ -1, /* continue */ 188, /* open */ 52, /* close */ @@ -2857,7 +2857,7 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { */ EXTCONST U16 PL_op_private_bitdefs[] = { - 0x0003, /* scalar, prototype, refgen, srefgen, readline, regcmaybe, regcreset, regcomp, substcont, chop, schop, defined, undef, study, preinc, i_preinc, predec, i_predec, postinc, i_postinc, postdec, i_postdec, negate, i_negate, not, complement, ucfirst, lcfirst, uc, lc, quotemeta, aeach, avalues, each, pop, shift, grepstart, mapstart, mapwhile, range, and, or, dor, andassign, orassign, dorassign, argcheck, argdefelem, method, method_named, method_super, method_redir, method_redir_super, enterwhen, leavewhen, untie, tied, dbmclose, getsockname, getpeername, lstat, stat, readlink, readdir, telldir, rewinddir, closedir, localtime, alarm, require, dofile, entertry, ghbyname, gnbyname, gpbyname, shostent, snetent, sprotoent, sservent, gpwnam, gpwuid, ggrnam, ggrgid, lock, once, fc, anonconst */ + 0x0003, /* scalar, prototype, refgen, srefgen, readline, regcmaybe, regcreset, regcomp, substcont, chop, schop, defined, undef, study, preinc, i_preinc, predec, i_predec, postinc, i_postinc, postdec, i_postdec, negate, i_negate, not, complement, ucfirst, lcfirst, uc, lc, quotemeta, aeach, avalues, each, pop, shift, grepstart, mapstart, mapwhile, range, and, or, dor, andassign, orassign, dorassign, argcheck, argdefelem, method, method_named, method_super, method_redir, method_redir_super, enterwhereso, leavewhereso, untie, tied, dbmclose, getsockname, getpeername, lstat, stat, readlink, readdir, telldir, rewinddir, closedir, localtime, alarm, require, dofile, entertry, ghbyname, gnbyname, gpbyname, shostent, snetent, sprotoent, sservent, gpwnam, gpwuid, ggrnam, ggrgid, lock, once, fc, anonconst */ 0x2ebc, 0x3fb9, /* pushmark */ 0x00bd, /* wantarray, runcv */ 0x0578, 0x1930, 0x406c, 0x3b28, 0x3305, /* const */ @@ -3152,8 +3152,8 @@ EXTCONST U8 PL_op_private_valid[] = { /* METHOD_REDIR */ (OPpARG1_MASK), /* METHOD_REDIR_SUPER */ (OPpARG1_MASK), /* ENTERGIVEN */ (0), - /* ENTERWHEN */ (OPpARG1_MASK), - /* LEAVEWHEN */ (OPpARG1_MASK), + /* ENTERWHERESO */ (OPpARG1_MASK), + /* LEAVEWHERESO */ (OPpARG1_MASK), /* CONTINUE */ (0), /* OPEN */ (OPpARG4_MASK|OPpOPEN_IN_RAW|OPpOPEN_IN_CRLF|OPpOPEN_OUT_RAW|OPpOPEN_OUT_CRLF), /* CLOSE */ (OPpARG4_MASK), @@ -232,8 +232,8 @@ typedef enum opcode { OP_METHOD_REDIR = 215, OP_METHOD_REDIR_SUPER = 216, OP_ENTERGIVEN = 217, - OP_ENTERWHEN = 218, - OP_LEAVEWHEN = 219, + OP_ENTERWHERESO = 218, + OP_LEAVEWHERESO = 219, OP_CONTINUE = 220, OP_OPEN = 221, OP_CLOSE = 222, @@ -4658,7 +4658,7 @@ EXTCONST unsigned char PL_freq[]; #ifdef DOINIT EXTCONST char* const PL_block_type[] = { "NULL", - "WHEN", + "WHERESO", "BLOCK", "LOOP_GIVEN", "LOOP_ARY", @@ -392,7 +392,7 @@ case 2: case 39: #line 382 "perly.y" /* yacc.c:1646 */ - { (yyval.opval) = block_end((ps[-3].val.ival), newWHENOP((ps[-2].val.opval), op_scope((ps[0].val.opval)))); } + { (yyval.opval) = block_end((ps[-3].val.ival), newWHERESOOP((ps[-2].val.opval), op_scope((ps[0].val.opval)))); } break; @@ -648,7 +648,7 @@ case 2: case 67: #line 535 "perly.y" /* yacc.c:1646 */ - { (yyval.opval) = newWHENOP((ps[0].val.opval), op_scope((ps[-2].val.opval))); } + { (yyval.opval) = newWHERESOOP((ps[0].val.opval), op_scope((ps[-2].val.opval))); } break; @@ -1977,6 +1977,6 @@ case 2: /* Generated from: - * 03a4b1d58244383edfcce2549f649e112744b3efc4083221c08bb0e1e4d221c5 perly.y + * f62d35e9a10a10071f1ac20676ddc12abcffbef44a24ef694c36201e994d0900 perly.y * b6fae5748f9bef6db4740aa5e122b84ac5181852d42474d0ecad621fa4253306 regen_perly.pl * ex: set ro: */ @@ -180,6 +180,6 @@ int yyparse (void); /* Generated from: - * 03a4b1d58244383edfcce2549f649e112744b3efc4083221c08bb0e1e4d221c5 perly.y + * f62d35e9a10a10071f1ac20676ddc12abcffbef44a24ef694c36201e994d0900 perly.y * b6fae5748f9bef6db4740aa5e122b84ac5181852d42474d0ecad621fa4253306 regen_perly.pl * ex: set ro: */ @@ -1103,6 +1103,6 @@ static const toketypes yy_type_tab[] = }; /* Generated from: - * 03a4b1d58244383edfcce2549f649e112744b3efc4083221c08bb0e1e4d221c5 perly.y + * f62d35e9a10a10071f1ac20676ddc12abcffbef44a24ef694c36201e994d0900 perly.y * b6fae5748f9bef6db4740aa5e122b84ac5181852d42474d0ecad621fa4253306 regen_perly.pl * ex: set ro: */ @@ -379,7 +379,7 @@ barestmt: PLUGSTMT parser->copline = (line_t)$1; } | WHERESO '(' remember mexpr ')' mblock - { $$ = block_end($3, newWHENOP($4, op_scope($6))); } + { $$ = block_end($3, newWHERESOOP($4, op_scope($6))); } | WHILE '(' remember texpr ')' mintro mblock cont { $$ = block_end($3, @@ -532,7 +532,7 @@ sideff : error { $$ = newFOROP(0, NULL, $3, $1, NULL); parser->copline = (line_t)$2; } | expr WHERESO expr - { $$ = newWHENOP($3, op_scope($1)); } + { $$ = newWHERESOOP($3, op_scope($1)); } ; /* else and elsif blocks */ @@ -1285,7 +1285,7 @@ PP(pp_flop) static const char * const context_name[] = { "pseudo-block", - NULL, /* CXt_WHEN never actually needs "block" */ + NULL, /* CXt_WHERESO never actually needs "block" */ NULL, /* CXt_BLOCK never actually needs "block" */ NULL, /* CXt_LOOP_GIVEN never actually needs "block" */ NULL, /* CXt_LOOP_PLAIN never actually needs "loop" */ @@ -1483,7 +1483,7 @@ S_dopoptoloop(pTHX_ I32 startingblock) } STATIC I32 -S_dopoptowhen(pTHX_ I32 startingblock) +S_dopoptowhereso(pTHX_ I32 startingblock) { I32 i; for (i = startingblock; i >= 0; i--) { @@ -1491,8 +1491,8 @@ S_dopoptowhen(pTHX_ I32 startingblock) switch (CxTYPE(cx)) { default: continue; - case CXt_WHEN: - DEBUG_l( Perl_deb(aTHX_ "(dopoptowhen(): found when at cx=%ld)\n", (long)i)); + case CXt_WHERESO: + DEBUG_l( Perl_deb(aTHX_ "(dopoptowhereso(): found whereso at cx=%ld)\n", (long)i)); return i; } } @@ -1544,8 +1544,8 @@ Perl_dounwind(pTHX_ I32 cxix) case CXt_LOOP_ARY: cx_poploop(cx); break; - case CXt_WHEN: - cx_popwhen(cx); + case CXt_WHERESO: + cx_popwhereso(cx); break; case CXt_BLOCK: case CXt_NULL: @@ -2957,7 +2957,7 @@ PP(pp_goto) case CXt_LOOP_LIST: case CXt_LOOP_ARY: case CXt_LOOP_GIVEN: - case CXt_WHEN: + case CXt_WHERESO: gotoprobe = OpSIBLING(cx->blk_oldcop); break; case CXt_SUBST: @@ -4592,7 +4592,7 @@ PP(pp_smartmatch) Perl_croak(aTHX_ "Cannot smart match without a matcher object"); } -PP(pp_enterwhen) +PP(pp_enterwhereso) { dSP; PERL_CONTEXT *cx; @@ -4601,19 +4601,19 @@ PP(pp_enterwhen) /* This is essentially an optimization: if the match fails, we don't want to push a context and then pop it again right away, so we skip straight - to the op that follows the leavewhen. + to the op that follows the leavewhereso. RETURNOP calls PUTBACK which restores the stack pointer after the POPs. */ if (!SvTRUEx(POPs)) RETURNOP(cLOGOP->op_other->op_next); - cx = cx_pushblock(CXt_WHEN, gimme, SP, PL_savestack_ix); - cx_pushwhen(cx); + cx = cx_pushblock(CXt_WHERESO, gimme, SP, PL_savestack_ix); + cx_pushwhereso(cx); RETURN; } -PP(pp_leavewhen) +PP(pp_leavewhereso) { I32 cxix; PERL_CONTEXT *cx; @@ -4621,7 +4621,7 @@ PP(pp_leavewhen) SV **oldsp; cx = CX_CUR(); - assert(CxTYPE(cx) == CXt_WHEN); + assert(CxTYPE(cx) == CXt_WHERESO); gimme = cx->blk_gimme; cxix = dopoptoloop(cxstack_ix); @@ -4634,7 +4634,7 @@ PP(pp_leavewhen) else leave_adjust_stacks(oldsp, oldsp, gimme, 1); - /* pop the WHEN, BLOCK and anything else before the loop */ + /* pop the WHERESO, BLOCK and anything else before the loop */ assert(cxix < cxstack_ix); dounwind(cxix); @@ -4662,7 +4662,7 @@ PP(pp_continue) PERL_CONTEXT *cx; OP *nextop; - cxix = dopoptowhen(cxstack_ix); + cxix = dopoptowhereso(cxstack_ix); if (cxix < 0) DIE(aTHX_ "Can't \"continue\" outside a whereso block"); @@ -4670,12 +4670,12 @@ PP(pp_continue) dounwind(cxix); cx = CX_CUR(); - assert(CxTYPE(cx) == CXt_WHEN); + assert(CxTYPE(cx) == CXt_WHERESO); PL_stack_sp = PL_stack_base + cx->blk_oldsp; CX_LEAVE_SCOPE(cx); - cx_popwhen(cx); + cx_popwhereso(cx); cx_popblock(cx); - nextop = cx->blk_when.leave_op->op_next; + nextop = cx->blk_whereso.leave_op->op_next; CX_POP(cx); return nextop; diff --git a/pp_proto.h b/pp_proto.h index 2eb4bacbf3..304e0f23a1 100644 --- a/pp_proto.h +++ b/pp_proto.h @@ -63,7 +63,7 @@ PERL_CALLCONV OP *Perl_pp_enteriter(pTHX); PERL_CALLCONV OP *Perl_pp_enterloop(pTHX); PERL_CALLCONV OP *Perl_pp_entersub(pTHX); PERL_CALLCONV OP *Perl_pp_entertry(pTHX); -PERL_CALLCONV OP *Perl_pp_enterwhen(pTHX); +PERL_CALLCONV OP *Perl_pp_enterwhereso(pTHX); PERL_CALLCONV OP *Perl_pp_enterwrite(pTHX); PERL_CALLCONV OP *Perl_pp_eof(pTHX); PERL_CALLCONV OP *Perl_pp_eq(pTHX); @@ -138,7 +138,7 @@ PERL_CALLCONV OP *Perl_pp_leaveloop(pTHX); PERL_CALLCONV OP *Perl_pp_leavesub(pTHX); PERL_CALLCONV OP *Perl_pp_leavesublv(pTHX); PERL_CALLCONV OP *Perl_pp_leavetry(pTHX); -PERL_CALLCONV OP *Perl_pp_leavewhen(pTHX); +PERL_CALLCONV OP *Perl_pp_leavewhereso(pTHX); PERL_CALLCONV OP *Perl_pp_leavewrite(pTHX); PERL_CALLCONV OP *Perl_pp_left_shift(pTHX); PERL_CALLCONV OP *Perl_pp_length(pTHX); @@ -2350,9 +2350,9 @@ PERL_CALLCONV OP* Perl_newUNOP(pTHX_ I32 type, I32 flags, OP* first) PERL_CALLCONV OP* Perl_newUNOP_AUX(pTHX_ I32 type, I32 flags, OP* first, UNOP_AUX_item *aux) __attribute__warn_unused_result__; -PERL_CALLCONV OP* Perl_newWHENOP(pTHX_ OP* cond, OP* block) +PERL_CALLCONV OP* Perl_newWHERESOOP(pTHX_ OP* cond, OP* block) __attribute__warn_unused_result__; -#define PERL_ARGS_ASSERT_NEWWHENOP \ +#define PERL_ARGS_ASSERT_NEWWHERESOOP \ assert(cond); assert(block) PERL_CALLCONV OP* Perl_newWHILEOP(pTHX_ I32 flags, I32 debuggable, LOOP* loop, OP* expr, OP* block, OP* cont, I32 has_my) @@ -4008,8 +4008,8 @@ PERL_STATIC_INLINE void S_cx_popsub_common(pTHX_ PERL_CONTEXT *cx); assert(cx) #endif #ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE void S_cx_popwhen(pTHX_ PERL_CONTEXT *cx); -#define PERL_ARGS_ASSERT_CX_POPWHEN \ +PERL_STATIC_INLINE void S_cx_popwhereso(pTHX_ PERL_CONTEXT *cx); +#define PERL_ARGS_ASSERT_CX_POPWHERESO \ assert(cx) #endif #ifndef PERL_NO_INLINE_FUNCTIONS @@ -4048,8 +4048,8 @@ PERL_STATIC_INLINE void S_cx_pushsub(pTHX_ PERL_CONTEXT *cx, CV *cv, OP *retop, assert(cx); assert(cv) #endif #ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE void S_cx_pushwhen(pTHX_ PERL_CONTEXT *cx); -#define PERL_ARGS_ASSERT_CX_PUSHWHEN \ +PERL_STATIC_INLINE void S_cx_pushwhereso(pTHX_ PERL_CONTEXT *cx); +#define PERL_ARGS_ASSERT_CX_PUSHWHERESO \ assert(cx) #endif #ifndef PERL_NO_INLINE_FUNCTIONS @@ -4911,7 +4911,7 @@ STATIC I32 S_dopoptosub_at(pTHX_ const PERL_CONTEXT* cxstk, I32 startingblock) #define PERL_ARGS_ASSERT_DOPOPTOSUB_AT \ assert(cxstk) -STATIC I32 S_dopoptowhen(pTHX_ I32 startingblock) +STATIC I32 S_dopoptowhereso(pTHX_ I32 startingblock) __attribute__warn_unused_result__; STATIC bool S_num_overflow(NV value, I32 fldsize, I32 frcsize) diff --git a/regen/opcodes b/regen/opcodes index 1aaee2bec0..476279b100 100644 --- a/regen/opcodes +++ b/regen/opcodes @@ -329,8 +329,8 @@ method_redir redirect method with known name ck_null d. method_redir_super redirect super method with known name ck_null d. entergiven given() ck_null d{ -enterwhen whereso() ck_null d| -leavewhen leave whereso block ck_null 1 +enterwhereso whereso() ck_null d| +leavewhereso leave whereso block ck_null 1 continue continue ck_null 0 # I/O. @@ -14641,7 +14641,7 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, CLONE_PARAMS* param) break; case CXt_BLOCK: case CXt_NULL: - case CXt_WHEN: + case CXt_WHERESO: break; } } |