summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/B/Op_private.pm70
-rw-r--r--op.c25
-rw-r--r--opcode.h92
-rw-r--r--regen/op_private32
4 files changed, 111 insertions, 108 deletions
diff --git a/lib/B/Op_private.pm b/lib/B/Op_private.pm
index d9dbb8bce6..6dfebdb737 100644
--- a/lib/B/Op_private.pm
+++ b/lib/B/Op_private.pm
@@ -113,7 +113,7 @@ our %bits;
our $VERSION = "5.021006";
$bits{$_}{3} = 'OPpENTERSUB_AMPER' for qw(entersub rv2cv);
-$bits{$_}{4} = 'OPpENTERSUB_DB' for qw(entersub rv2cv);
+$bits{$_}{6} = 'OPpENTERSUB_DB' for qw(entersub rv2cv);
$bits{$_}{2} = 'OPpENTERSUB_HASTARG' for qw(entersub rv2cv);
$bits{$_}{6} = 'OPpFLIP_LINENUM' for qw(flip flop);
$bits{$_}{1} = 'OPpFT_ACCESS' for qw(fteexec fteread ftewrite ftrexec ftrread ftrwrite);
@@ -127,19 +127,19 @@ $bits{$_}{1} = 'OPpHINT_STRICT_REFS' for qw(entersub rv2av rv2cv rv2gv rv2hv rv2
$bits{$_}{5} = 'OPpHUSH_VMSISH' for qw(dbstate nextstate);
$bits{$_}{2} = 'OPpITER_REVERSED' for qw(enteriter iter);
$bits{$_}{7} = 'OPpLVALUE' for qw(leave leaveloop);
-$bits{$_}{4} = 'OPpLVAL_DEFER' for qw(aelem helem);
+$bits{$_}{6} = 'OPpLVAL_DEFER' for qw(aelem helem);
$bits{$_}{7} = 'OPpLVAL_INTRO' for qw(aelem aslice cond_expr delete enteriter entersub gvsv helem hslice list lvavref lvref lvrefslice padav padhv padrange padsv pushmark refassign rv2av rv2gv rv2hv rv2sv);
$bits{$_}{2} = 'OPpLVREF_ELEM' for qw(lvref refassign);
$bits{$_}{3} = 'OPpLVREF_ITER' for qw(lvref refassign);
$bits{$_}{3} = 'OPpMAYBE_LVSUB' for qw(aassign aelem aslice av2arylen helem hslice keys kvaslice kvhslice padav padhv pos rkeys rv2av rv2gv rv2hv substr vec);
-$bits{$_}{6} = 'OPpMAYBE_TRUEBOOL' for qw(padhv rv2hv);
+$bits{$_}{4} = 'OPpMAYBE_TRUEBOOL' for qw(padhv rv2hv);
$bits{$_}{7} = 'OPpOFFBYONE' for qw(caller runcv wantarray);
$bits{$_}{5} = 'OPpOPEN_IN_CRLF' for qw(backtick open);
$bits{$_}{4} = 'OPpOPEN_IN_RAW' for qw(backtick open);
$bits{$_}{7} = 'OPpOPEN_OUT_CRLF' for qw(backtick open);
$bits{$_}{6} = 'OPpOPEN_OUT_RAW' for qw(backtick open);
-$bits{$_}{4} = 'OPpOUR_INTRO' for qw(enteriter gvsv rv2av rv2hv rv2sv split);
-$bits{$_}{4} = 'OPpPAD_STATE' for qw(lvavref lvref padav padhv padsv pushmark refassign);
+$bits{$_}{6} = 'OPpOUR_INTRO' for qw(enteriter gvsv rv2av rv2hv rv2sv split);
+$bits{$_}{6} = 'OPpPAD_STATE' for qw(lvavref lvref padav padhv padsv pushmark refassign);
$bits{$_}{7} = 'OPpPV_IS_UTF8' for qw(dump goto last next redo);
$bits{$_}{6} = 'OPpREFCOUNTED' for qw(leave leaveeval leavesub leavesublv leavewrite);
$bits{$_}{6} = 'OPpRUNTIME' for qw(match pushre qr subst substcont);
@@ -199,9 +199,9 @@ my @bf = (
},
{
mask_def => 'OPpDEREF',
- bitmin => 5,
- bitmax => 6,
- bitmask => 96,
+ bitmin => 4,
+ bitmax => 5,
+ bitmask => 48,
enum => [
1, 'OPpDEREF_AV', 'DREFAV',
2, 'OPpDEREF_HV', 'DREFHV',
@@ -210,9 +210,9 @@ my @bf = (
},
{
mask_def => 'OPpLVREF_TYPE',
- bitmin => 5,
- bitmax => 6,
- bitmask => 96,
+ bitmin => 4,
+ bitmax => 5,
+ bitmask => 48,
enum => [
0, 'OPpLVREF_SV', 'SV',
1, 'OPpLVREF_AV', 'AV',
@@ -227,7 +227,7 @@ $bits{abs}{0} = $bf[0];
@{$bits{accept}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
@{$bits{add}}{1,0} = ($bf[1], $bf[1]);
$bits{aeach}{0} = $bf[0];
-@{$bits{aelem}}{6,5,1,0} = ($bf[6], $bf[6], $bf[1], $bf[1]);
+@{$bits{aelem}}{5,4,1,0} = ($bf[6], $bf[6], $bf[1], $bf[1]);
@{$bits{aelemfast}}{7,6,5,4,3,2,1,0} = ($bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5]);
@{$bits{aelemfast_lex}}{7,6,5,4,3,2,1,0} = ($bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5]);
$bits{akeys}{0} = $bf[0];
@@ -278,7 +278,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{entergiven}{0} = $bf[0];
$bits{enteriter}{3} = 'OPpITER_DEF';
-@{$bits{entersub}}{6,5,0} = ($bf[6], $bf[6], 'OPpENTERSUB_INARGS');
+@{$bits{entersub}}{5,4,0} = ($bf[6], $bf[6], 'OPpENTERSUB_INARGS');
$bits{entertry}{0} = $bf[0];
$bits{enterwhen}{0} = $bf[0];
@{$bits{enterwrite}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
@@ -348,7 +348,7 @@ $bits{grepwhile}{0} = $bf[0];
@{$bits{gsockopt}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
@{$bits{gt}}{1,0} = ($bf[1], $bf[1]);
$bits{gv}{5} = 'OPpEARLY_CV';
-@{$bits{helem}}{6,5,1,0} = ($bf[6], $bf[6], $bf[1], $bf[1]);
+@{$bits{helem}}{5,4,1,0} = ($bf[6], $bf[6], $bf[1], $bf[1]);
$bits{hex}{0} = $bf[0];
@{$bits{i_add}}{1,0} = ($bf[1], $bf[1]);
@{$bits{i_divide}}{1,0} = ($bf[1], $bf[1]);
@@ -396,7 +396,7 @@ $bits{log}{0} = $bf[0];
$bits{lstat}{0} = $bf[0];
@{$bits{lt}}{1,0} = ($bf[1], $bf[1]);
$bits{lvavref}{0} = $bf[0];
-@{$bits{lvref}}{6,5,0} = ($bf[7], $bf[7], $bf[0]);
+@{$bits{lvref}}{5,4,0} = ($bf[7], $bf[7], $bf[0]);
$bits{mapwhile}{0} = $bf[0];
$bits{method}{0} = $bf[0];
$bits{method_named}{0} = $bf[0];
@@ -421,7 +421,7 @@ $bits{orassign}{0} = $bf[0];
$bits{ord}{0} = $bf[0];
@{$bits{pack}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
@{$bits{padrange}}{6,5,4,3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4], $bf[4], $bf[4], $bf[4]);
-@{$bits{padsv}}{6,5} = ($bf[6], $bf[6]);
+@{$bits{padsv}}{5,4} = ($bf[6], $bf[6]);
@{$bits{pipe_op}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
$bits{pop}{0} = $bf[0];
$bits{pos}{0} = $bf[0];
@@ -443,7 +443,7 @@ $bits{readlink}{0} = $bf[0];
@{$bits{recv}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
$bits{redo}{0} = $bf[0];
$bits{ref}{0} = $bf[0];
-@{$bits{refassign}}{6,5,1,0} = ($bf[7], $bf[7], $bf[1], $bf[1]);
+@{$bits{refassign}}{5,4,1,0} = ($bf[7], $bf[7], $bf[1], $bf[1]);
$bits{refgen}{0} = $bf[0];
$bits{regcmaybe}{0} = $bf[0];
$bits{regcomp}{0} = $bf[0];
@@ -459,10 +459,10 @@ $bits{rewinddir}{0} = $bf[0];
$bits{rkeys}{0} = $bf[0];
$bits{rmdir}{0} = $bf[0];
$bits{rv2av}{0} = $bf[0];
-@{$bits{rv2cv}}{7,6,0} = ('OPpENTERSUB_NOPAREN', 'OPpMAY_RETURN_CONSTANT', $bf[0]);
-@{$bits{rv2gv}}{6,5,4,2,0} = ($bf[6], $bf[6], 'OPpALLOW_FAKE', 'OPpDONT_INIT_GV', $bf[0]);
+@{$bits{rv2cv}}{7,5,0} = ('OPpENTERSUB_NOPAREN', 'OPpMAY_RETURN_CONSTANT', $bf[0]);
+@{$bits{rv2gv}}{6,5,4,2,0} = ('OPpALLOW_FAKE', $bf[6], $bf[6], 'OPpDONT_INIT_GV', $bf[0]);
$bits{rv2hv}{0} = $bf[0];
-@{$bits{rv2sv}}{6,5,0} = ($bf[6], $bf[6], $bf[0]);
+@{$bits{rv2sv}}{5,4,0} = ($bf[6], $bf[6], $bf[0]);
$bits{rvalues}{0} = $bf[0];
@{$bits{sassign}}{7,6,1,0} = ('OPpASSIGN_CV_TO_GV', 'OPpASSIGN_BACKWARDS', $bf[1], $bf[1]);
$bits{scalar}{0} = $bf[0];
@@ -543,7 +543,7 @@ $bits{values}{0} = $bf[0];
our %defines = (
- OPpALLOW_FAKE => 16,
+ OPpALLOW_FAKE => 64,
OPpARG1_MASK => 1,
OPpARG2_MASK => 3,
OPpARG3_MASK => 7,
@@ -560,14 +560,14 @@ our %defines = (
OPpCOREARGS_DEREF2 => 2,
OPpCOREARGS_PUSHMARK => 128,
OPpCOREARGS_SCALARMOD => 64,
- OPpDEREF => 96,
- OPpDEREF_AV => 32,
- OPpDEREF_HV => 64,
- OPpDEREF_SV => 96,
+ OPpDEREF => 48,
+ OPpDEREF_AV => 16,
+ OPpDEREF_HV => 32,
+ OPpDEREF_SV => 48,
OPpDONT_INIT_GV => 4,
OPpEARLY_CV => 32,
OPpENTERSUB_AMPER => 8,
- OPpENTERSUB_DB => 16,
+ OPpENTERSUB_DB => 64,
OPpENTERSUB_HASTARG => 4,
OPpENTERSUB_INARGS => 1,
OPpENTERSUB_NOPAREN => 128,
@@ -591,27 +591,27 @@ our %defines = (
OPpITER_REVERSED => 4,
OPpLIST_GUESSED => 64,
OPpLVALUE => 128,
- OPpLVAL_DEFER => 16,
+ OPpLVAL_DEFER => 64,
OPpLVAL_INTRO => 128,
- OPpLVREF_AV => 32,
- OPpLVREF_CV => 96,
+ OPpLVREF_AV => 16,
+ OPpLVREF_CV => 48,
OPpLVREF_ELEM => 4,
- OPpLVREF_HV => 64,
+ OPpLVREF_HV => 32,
OPpLVREF_ITER => 8,
OPpLVREF_SV => 0,
- OPpLVREF_TYPE => 96,
+ OPpLVREF_TYPE => 48,
OPpMAYBE_LVSUB => 8,
- OPpMAYBE_TRUEBOOL => 64,
- OPpMAY_RETURN_CONSTANT => 64,
+ OPpMAYBE_TRUEBOOL => 16,
+ OPpMAY_RETURN_CONSTANT => 32,
OPpOFFBYONE => 128,
OPpOPEN_IN_CRLF => 32,
OPpOPEN_IN_RAW => 16,
OPpOPEN_OUT_CRLF => 128,
OPpOPEN_OUT_RAW => 64,
- OPpOUR_INTRO => 16,
+ OPpOUR_INTRO => 64,
OPpPADRANGE_COUNTMASK => 127,
OPpPADRANGE_COUNTSHIFT => 7,
- OPpPAD_STATE => 16,
+ OPpPAD_STATE => 64,
OPpPV_IS_UTF8 => 128,
OPpREFCOUNTED => 64,
OPpREPEAT_DOLIST => 64,
diff --git a/op.c b/op.c
index 0b345187da..de2b4c0136 100644
--- a/op.c
+++ b/op.c
@@ -1662,14 +1662,9 @@ Perl_scalarvoid(pTHX_ OP *arg)
if (o->op_private == 4)
break;
/* FALLTHROUGH */
- case OP_GVSV:
case OP_WANTARRAY:
case OP_GV:
case OP_SMARTMATCH:
- case OP_PADSV:
- case OP_PADAV:
- case OP_PADHV:
- case OP_PADANY:
case OP_AV2ARYLEN:
case OP_REF:
case OP_REFGEN:
@@ -1682,13 +1677,7 @@ Perl_scalarvoid(pTHX_ OP *arg)
case OP_INDEX:
case OP_RINDEX:
case OP_SPRINTF:
- case OP_AELEM:
- case OP_AELEMFAST:
- case OP_AELEMFAST_LEX:
- case OP_ASLICE:
case OP_KVASLICE:
- case OP_HELEM:
- case OP_HSLICE:
case OP_KVHSLICE:
case OP_UNPACK:
case OP_PACK:
@@ -1736,6 +1725,20 @@ Perl_scalarvoid(pTHX_ OP *arg)
case OP_PROTOTYPE:
case OP_RUNCV:
func_ops:
+ useless = OP_DESC(o);
+ break;
+
+ case OP_GVSV:
+ case OP_PADSV:
+ case OP_PADAV:
+ case OP_PADHV:
+ case OP_PADANY:
+ case OP_AELEM:
+ case OP_AELEMFAST:
+ case OP_AELEMFAST_LEX:
+ case OP_ASLICE:
+ case OP_HELEM:
+ case OP_HSLICE:
if (!(o->op_private & (OPpLVAL_INTRO|OPpOUR_INTRO)))
/* Otherwise it's "Useless use of grep iterator" */
useless = OP_DESC(o);
diff --git a/opcode.h b/opcode.h
index 04fdbfd675..b9f6442691 100644
--- a/opcode.h
+++ b/opcode.h
@@ -2169,50 +2169,50 @@ END_EXTERN_C
#define OPpSORT_INPLACE 0x08
#define OPpTRANS_SQUASH 0x08
#define OPpARG4_MASK 0x0f
-#define OPpALLOW_FAKE 0x10
#define OPpCONST_ENTERED 0x10
-#define OPpENTERSUB_DB 0x10
+#define OPpDEREF_AV 0x10
#define OPpEVAL_COPHH 0x10
#define OPpFT_AFTER_t 0x10
-#define OPpLVAL_DEFER 0x10
+#define OPpLVREF_AV 0x10
+#define OPpMAYBE_TRUEBOOL 0x10
#define OPpOPEN_IN_RAW 0x10
-#define OPpOUR_INTRO 0x10
-#define OPpPAD_STATE 0x10
#define OPpSORT_DESCEND 0x10
#define OPpSUBSTR_REPL_FIRST 0x10
#define OPpTARGET_MY 0x10
-#define OPpDEREF_AV 0x20
+#define OPpDEREF_HV 0x20
#define OPpEARLY_CV 0x20
#define OPpEVAL_RE_REPARSING 0x20
#define OPpHUSH_VMSISH 0x20
-#define OPpLVREF_AV 0x20
+#define OPpLVREF_HV 0x20
+#define OPpMAY_RETURN_CONSTANT 0x20
#define OPpOPEN_IN_CRLF 0x20
#define OPpSORT_QSORT 0x20
#define OPpTRANS_COMPLEMENT 0x20
#define OPpTRUEBOOL 0x20
+#define OPpDEREF 0x30
+#define OPpDEREF_SV 0x30
+#define OPpLVREF_CV 0x30
+#define OPpLVREF_TYPE 0x30
+#define OPpALLOW_FAKE 0x40
#define OPpASSIGN_BACKWARDS 0x40
#define OPpASSIGN_COMMON 0x40
#define OPpCONST_BARE 0x40
#define OPpCOREARGS_SCALARMOD 0x40
-#define OPpDEREF_HV 0x40
+#define OPpENTERSUB_DB 0x40
#define OPpEXISTS_SUB 0x40
#define OPpFLIP_LINENUM 0x40
#define OPpHINT_M_VMSISH_STATUS 0x40
#define OPpLIST_GUESSED 0x40
-#define OPpLVREF_HV 0x40
-#define OPpMAYBE_TRUEBOOL 0x40
-#define OPpMAY_RETURN_CONSTANT 0x40
+#define OPpLVAL_DEFER 0x40
#define OPpOPEN_OUT_RAW 0x40
+#define OPpOUR_INTRO 0x40
+#define OPpPAD_STATE 0x40
#define OPpREFCOUNTED 0x40
#define OPpREPEAT_DOLIST 0x40
#define OPpRUNTIME 0x40
#define OPpSLICE 0x40
#define OPpSORT_STABLE 0x40
#define OPpTRANS_GROWS 0x40
-#define OPpDEREF 0x60
-#define OPpDEREF_SV 0x60
-#define OPpLVREF_CV 0x60
-#define OPpLVREF_TYPE 0x60
#define OPpPADRANGE_COUNTMASK 0x7f
#define OPpASSIGN_CV_TO_GV 0x80
#define OPpCOREARGS_PUSHMARK 0x80
@@ -2355,8 +2355,8 @@ EXTCONST I16 PL_op_private_bitfields[] = {
0, 8, -1,
0, 8, -1,
0, 8, -1,
- 5, -1, 1, 130, 2, 137, 3, 144, -1,
- 5, -1, 0, 481, 1, 26, 2, 250, 3, 83, -1,
+ 4, -1, 1, 130, 2, 137, 3, 144, -1,
+ 4, -1, 0, 481, 1, 26, 2, 250, 3, 83, -1,
};
@@ -2767,20 +2767,20 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = {
EXTCONST U16 PL_op_private_bitdefs[] = {
/* scalar */ 0x0003,
- /* pushmark */ 0x281c, 0x3a11,
+ /* pushmark */ 0x281c, 0x3a19,
/* wantarray */ 0x00bd,
/* const */ 0x03b8, 0x1490, 0x3acc, 0x3588, 0x2be5,
- /* gvsv */ 0x281c, 0x2d31,
+ /* gvsv */ 0x281c, 0x2d39,
/* gv */ 0x12f5,
/* gelem */ 0x0067,
- /* padsv */ 0x281c, 0x025a, 0x3a11,
- /* padav */ 0x281c, 0x3a10, 0x290c, 0x3709,
- /* padhv */ 0x281c, 0x05d8, 0x0534, 0x3a10, 0x290c, 0x3709,
+ /* padsv */ 0x281c, 0x3a18, 0x0257,
+ /* padav */ 0x281c, 0x3a18, 0x290c, 0x3709,
+ /* padhv */ 0x281c, 0x3a18, 0x0534, 0x05d0, 0x290c, 0x3709,
/* pushre */ 0x34d9,
- /* rv2gv */ 0x281c, 0x025a, 0x1590, 0x290c, 0x2b08, 0x3ac4, 0x0003,
- /* rv2sv */ 0x281c, 0x025a, 0x2d30, 0x3ac4, 0x0003,
+ /* rv2gv */ 0x281c, 0x1598, 0x0256, 0x290c, 0x2b08, 0x3ac4, 0x0003,
+ /* rv2sv */ 0x281c, 0x2d38, 0x0256, 0x3ac4, 0x0003,
/* av2arylen */ 0x290c, 0x0003,
- /* rv2cv */ 0x2a7c, 0x08f8, 0x0b90, 0x028c, 0x3c88, 0x3ac4, 0x0003,
+ /* rv2cv */ 0x2a7c, 0x0b98, 0x08f4, 0x028c, 0x3c88, 0x3ac4, 0x0003,
/* prototype */ 0x0003,
/* refgen */ 0x0003,
/* srefgen */ 0x0003,
@@ -2888,10 +2888,10 @@ EXTCONST U16 PL_op_private_bitdefs[] = {
/* uc */ 0x0003,
/* lc */ 0x0003,
/* quotemeta */ 0x0003,
- /* rv2av */ 0x281c, 0x2d30, 0x290c, 0x3708, 0x3ac4, 0x0003,
+ /* rv2av */ 0x281c, 0x2d38, 0x290c, 0x3708, 0x3ac4, 0x0003,
/* aelemfast */ 0x01ff,
/* aelemfast_lex */ 0x01ff,
- /* aelem */ 0x281c, 0x025a, 0x2710, 0x290c, 0x0067,
+ /* aelem */ 0x281c, 0x2718, 0x0256, 0x290c, 0x0067,
/* aslice */ 0x281c, 0x290c, 0x3709,
/* kvaslice */ 0x290d,
/* aeach */ 0x0003,
@@ -2902,13 +2902,13 @@ EXTCONST U16 PL_op_private_bitdefs[] = {
/* keys */ 0x290c, 0x0003,
/* delete */ 0x281c, 0x3658, 0x0003,
/* exists */ 0x3bb8, 0x0003,
- /* rv2hv */ 0x281c, 0x05d8, 0x0534, 0x2d30, 0x290c, 0x3708, 0x3ac4, 0x0003,
- /* helem */ 0x281c, 0x025a, 0x2710, 0x290c, 0x0067,
+ /* rv2hv */ 0x281c, 0x2d38, 0x0534, 0x05d0, 0x290c, 0x3708, 0x3ac4, 0x0003,
+ /* helem */ 0x281c, 0x2718, 0x0256, 0x290c, 0x0067,
/* hslice */ 0x281c, 0x290c, 0x3709,
/* kvhslice */ 0x290d,
/* unpack */ 0x012f,
/* pack */ 0x012f,
- /* split */ 0x207c, 0x2d31,
+ /* split */ 0x207c, 0x2d39,
/* join */ 0x012f,
/* list */ 0x281c, 0x1cd9,
/* lslice */ 0x0067,
@@ -2937,7 +2937,7 @@ EXTCONST U16 PL_op_private_bitdefs[] = {
/* orassign */ 0x0003,
/* dorassign */ 0x0003,
/* method */ 0x0003,
- /* entersub */ 0x281c, 0x025a, 0x0b90, 0x028c, 0x3c88, 0x3ac4, 0x2141,
+ /* entersub */ 0x281c, 0x0b98, 0x0256, 0x028c, 0x3c88, 0x3ac4, 0x2141,
/* leavesub */ 0x3098, 0x0003,
/* leavesublv */ 0x3098, 0x0003,
/* caller */ 0x00bc, 0x012f,
@@ -2947,7 +2947,7 @@ EXTCONST U16 PL_op_private_bitdefs[] = {
/* nextstate */ 0x40dc, 0x3f18, 0x1eb5,
/* dbstate */ 0x40dc, 0x3f18, 0x1eb5,
/* leave */ 0x26bc, 0x3099,
- /* enteriter */ 0x281c, 0x2d30, 0x0c0c, 0x33a9,
+ /* enteriter */ 0x281c, 0x2d38, 0x0c0c, 0x33a9,
/* iter */ 0x33a9,
/* leaveloop */ 0x26bc, 0x0067,
/* last */ 0x3e9c, 0x0003,
@@ -3106,10 +3106,10 @@ EXTCONST U16 PL_op_private_bitdefs[] = {
/* runcv */ 0x00bd,
/* fc */ 0x0003,
/* padrange */ 0x281c, 0x019b,
- /* refassign */ 0x281c, 0x037a, 0x3a10, 0x250c, 0x13e8, 0x0067,
- /* lvref */ 0x281c, 0x037a, 0x3a10, 0x250c, 0x13e8, 0x0003,
+ /* refassign */ 0x281c, 0x3a18, 0x0376, 0x250c, 0x13e8, 0x0067,
+ /* lvref */ 0x281c, 0x3a18, 0x0376, 0x250c, 0x13e8, 0x0003,
/* lvrefslice */ 0x281d,
- /* lvavref */ 0x281c, 0x3a10, 0x0003,
+ /* lvavref */ 0x281c, 0x3a18, 0x0003,
};
@@ -3127,15 +3127,15 @@ EXTCONST U8 PL_op_private_valid[] = {
/* GVSV */ (OPpOUR_INTRO|OPpLVAL_INTRO),
/* GV */ (OPpEARLY_CV),
/* GELEM */ (OPpARG2_MASK),
- /* PADSV */ (OPpPAD_STATE|OPpDEREF|OPpLVAL_INTRO),
+ /* PADSV */ (OPpDEREF|OPpPAD_STATE|OPpLVAL_INTRO),
/* PADAV */ (OPpSLICEWARNING|OPpMAYBE_LVSUB|OPpPAD_STATE|OPpLVAL_INTRO),
- /* PADHV */ (OPpSLICEWARNING|OPpMAYBE_LVSUB|OPpPAD_STATE|OPpTRUEBOOL|OPpMAYBE_TRUEBOOL|OPpLVAL_INTRO),
+ /* PADHV */ (OPpSLICEWARNING|OPpMAYBE_LVSUB|OPpMAYBE_TRUEBOOL|OPpTRUEBOOL|OPpPAD_STATE|OPpLVAL_INTRO),
/* PADANY */ (0),
/* PUSHRE */ (OPpRUNTIME),
- /* RV2GV */ (OPpARG1_MASK|OPpHINT_STRICT_REFS|OPpDONT_INIT_GV|OPpMAYBE_LVSUB|OPpALLOW_FAKE|OPpDEREF|OPpLVAL_INTRO),
- /* RV2SV */ (OPpARG1_MASK|OPpHINT_STRICT_REFS|OPpOUR_INTRO|OPpDEREF|OPpLVAL_INTRO),
+ /* RV2GV */ (OPpARG1_MASK|OPpHINT_STRICT_REFS|OPpDONT_INIT_GV|OPpMAYBE_LVSUB|OPpDEREF|OPpALLOW_FAKE|OPpLVAL_INTRO),
+ /* RV2SV */ (OPpARG1_MASK|OPpHINT_STRICT_REFS|OPpDEREF|OPpOUR_INTRO|OPpLVAL_INTRO),
/* AV2ARYLEN */ (OPpARG1_MASK|OPpMAYBE_LVSUB),
- /* RV2CV */ (OPpARG1_MASK|OPpHINT_STRICT_REFS|OPpENTERSUB_HASTARG|OPpENTERSUB_AMPER|OPpENTERSUB_DB|OPpMAY_RETURN_CONSTANT|OPpENTERSUB_NOPAREN),
+ /* RV2CV */ (OPpARG1_MASK|OPpHINT_STRICT_REFS|OPpENTERSUB_HASTARG|OPpENTERSUB_AMPER|OPpMAY_RETURN_CONSTANT|OPpENTERSUB_DB|OPpENTERSUB_NOPAREN),
/* ANONCODE */ (0),
/* PROTOTYPE */ (OPpARG1_MASK),
/* REFGEN */ (OPpARG1_MASK),
@@ -3248,7 +3248,7 @@ EXTCONST U8 PL_op_private_valid[] = {
/* RV2AV */ (OPpARG1_MASK|OPpHINT_STRICT_REFS|OPpSLICEWARNING|OPpMAYBE_LVSUB|OPpOUR_INTRO|OPpLVAL_INTRO),
/* AELEMFAST */ (255),
/* AELEMFAST_LEX */ (255),
- /* AELEM */ (OPpARG2_MASK|OPpMAYBE_LVSUB|OPpLVAL_DEFER|OPpDEREF|OPpLVAL_INTRO),
+ /* AELEM */ (OPpARG2_MASK|OPpMAYBE_LVSUB|OPpDEREF|OPpLVAL_DEFER|OPpLVAL_INTRO),
/* ASLICE */ (OPpSLICEWARNING|OPpMAYBE_LVSUB|OPpLVAL_INTRO),
/* KVASLICE */ (OPpMAYBE_LVSUB),
/* AEACH */ (OPpARG1_MASK),
@@ -3259,8 +3259,8 @@ EXTCONST U8 PL_op_private_valid[] = {
/* KEYS */ (OPpARG1_MASK|OPpMAYBE_LVSUB),
/* DELETE */ (OPpARG1_MASK|OPpSLICE|OPpLVAL_INTRO),
/* EXISTS */ (OPpARG1_MASK|OPpEXISTS_SUB),
- /* RV2HV */ (OPpARG1_MASK|OPpHINT_STRICT_REFS|OPpSLICEWARNING|OPpMAYBE_LVSUB|OPpOUR_INTRO|OPpTRUEBOOL|OPpMAYBE_TRUEBOOL|OPpLVAL_INTRO),
- /* HELEM */ (OPpARG2_MASK|OPpMAYBE_LVSUB|OPpLVAL_DEFER|OPpDEREF|OPpLVAL_INTRO),
+ /* RV2HV */ (OPpARG1_MASK|OPpHINT_STRICT_REFS|OPpSLICEWARNING|OPpMAYBE_LVSUB|OPpMAYBE_TRUEBOOL|OPpTRUEBOOL|OPpOUR_INTRO|OPpLVAL_INTRO),
+ /* HELEM */ (OPpARG2_MASK|OPpMAYBE_LVSUB|OPpDEREF|OPpLVAL_DEFER|OPpLVAL_INTRO),
/* HSLICE */ (OPpSLICEWARNING|OPpMAYBE_LVSUB|OPpLVAL_INTRO),
/* KVHSLICE */ (OPpMAYBE_LVSUB),
/* UNPACK */ (OPpARG4_MASK),
@@ -3294,7 +3294,7 @@ EXTCONST U8 PL_op_private_valid[] = {
/* ORASSIGN */ (OPpARG1_MASK),
/* DORASSIGN */ (OPpARG1_MASK),
/* METHOD */ (OPpARG1_MASK),
- /* ENTERSUB */ (OPpENTERSUB_INARGS|OPpHINT_STRICT_REFS|OPpENTERSUB_HASTARG|OPpENTERSUB_AMPER|OPpENTERSUB_DB|OPpDEREF|OPpLVAL_INTRO),
+ /* ENTERSUB */ (OPpENTERSUB_INARGS|OPpHINT_STRICT_REFS|OPpENTERSUB_HASTARG|OPpENTERSUB_AMPER|OPpDEREF|OPpENTERSUB_DB|OPpLVAL_INTRO),
/* LEAVESUB */ (OPpARG1_MASK|OPpREFCOUNTED),
/* LEAVESUBLV */ (OPpARG1_MASK|OPpREFCOUNTED),
/* CALLER */ (OPpARG4_MASK|OPpOFFBYONE),
@@ -3497,8 +3497,8 @@ EXTCONST U8 PL_op_private_valid[] = {
/* INTROCV */ (0),
/* CLONECV */ (0),
/* PADRANGE */ (OPpPADRANGE_COUNTMASK|OPpLVAL_INTRO),
- /* REFASSIGN */ (OPpARG2_MASK|OPpLVREF_ELEM|OPpLVREF_ITER|OPpPAD_STATE|OPpLVREF_TYPE|OPpLVAL_INTRO),
- /* LVREF */ (OPpARG1_MASK|OPpLVREF_ELEM|OPpLVREF_ITER|OPpPAD_STATE|OPpLVREF_TYPE|OPpLVAL_INTRO),
+ /* REFASSIGN */ (OPpARG2_MASK|OPpLVREF_ELEM|OPpLVREF_ITER|OPpLVREF_TYPE|OPpPAD_STATE|OPpLVAL_INTRO),
+ /* LVREF */ (OPpARG1_MASK|OPpLVREF_ELEM|OPpLVREF_ITER|OPpLVREF_TYPE|OPpPAD_STATE|OPpLVAL_INTRO),
/* LVREFSLICE */ (OPpLVAL_INTRO),
/* LVAVREF */ (OPpARG1_MASK|OPpPAD_STATE|OPpLVAL_INTRO),
diff --git a/regen/op_private b/regen/op_private
index c1877e9372..090df37006 100644
--- a/regen/op_private
+++ b/regen/op_private
@@ -35,7 +35,7 @@ bit bit field. Here's a general example:
addbits('aelem',
7 => qw(OPpLVAL_INTRO LVINTRO),
- '5..6' => {
+ '4..5' => {
mask_def => 'OPpDEREF',
enum => [ qw(
1 OPpDEREF_AV DREFAV
@@ -43,7 +43,7 @@ bit bit field. Here's a general example:
3 OPpDEREF_SV DREFSV
)],
},
- 4 => qw(OPpLVAL_DEFER LVDEFER),
+ 6 => qw(OPpLVAL_DEFER LVDEFER),
);
Here for the op C<aelem>, bits 4 and 7 (bits are numbered 0..7) are
@@ -402,7 +402,7 @@ addbits($_, 6 => qw(OPpRUNTIME RTIME))
# autovivify: Want ref to something
for (qw(rv2gv rv2sv padsv aelem helem entersub)) {
- addbits($_, '5..6' => {
+ addbits($_, '4..5' => {
mask_def => 'OPpDEREF',
enum => [ qw(
1 OPpDEREF_AV DREFAV
@@ -416,7 +416,7 @@ for (qw(rv2gv rv2sv padsv aelem helem entersub)) {
# Defer creation of array/hash elem
-addbits($_, 4 => qw(OPpLVAL_DEFER LVDEFER)) for qw(aelem helem);
+addbits($_, 6 => qw(OPpLVAL_DEFER LVDEFER)) for qw(aelem helem);
@@ -427,7 +427,7 @@ addbits($_, 2 => qw(OPpSLICEWARNING SLICEWARN)) # warn about @hash{$scalar}
# XXX Concise seemed to think that OPpOUR_INTRO is used in rv2gv too,
# but I can't see it - DAPM
-addbits($_, 4 => qw(OPpOUR_INTRO OURINTR)) # Variable was in an our()
+addbits($_, 6 => qw(OPpOUR_INTRO OURINTR)) # Variable was in an our()
for qw(gvsv rv2sv rv2av rv2hv enteriter split);
@@ -441,8 +441,8 @@ addbits($_, 3 => qw(OPpMAYBE_LVSUB LVSUB))
for (qw(rv2hv padhv)) {
addbits($_, # e.g. %hash in (%hash || $foo) ...
+ 4 => qw(OPpMAYBE_TRUEBOOL BOOL?), # ... cx not known till run time
5 => qw(OPpTRUEBOOL BOOL), # ... in void cxt
- 6 => qw(OPpMAYBE_TRUEBOOL BOOL?), # ... cx not known till run time
);
}
@@ -471,7 +471,7 @@ addbits($_, 7 => qw(OPpPV_IS_UTF8 UTF)) for qw(last redo next goto dump);
-addbits($_, 4 => qw(OPpPAD_STATE STATE)) for qw(padav padhv padsv lvavref
+addbits($_, 6 => qw(OPpPAD_STATE STATE)) for qw(padav padhv padsv lvavref
lvref refassign pushmark);
@@ -526,9 +526,9 @@ addbits('repeat', 6 => qw(OPpREPEAT_DOLIST DOLIST)); # List replication
# 1 HINT_STRICT_REFS check HINT_STRICT_REFS check
# 2 OPpENTERSUB_HASTARG checki OPpENTERSUB_HASTARG
# 3 OPpENTERSUB_AMPER check OPpENTERSUB_AMPER parser
-# 4 OPpENTERSUB_DB check OPpENTERSUB_DB
-# 5 OPpDEREF_AV context
-# 6 OPpDEREF_HV context OPpMAY_RETURN_CONSTANT parser/context
+# 4 OPpDEREF_AV context
+# 5 OPpDEREF_HV context OPpMAY_RETURN_CONSTANT parser/context
+# 6 OPpENTERSUB_DB check OPpENTERSUB_DB
# 7 OPpLVAL_INTRO context OPpENTERSUB_NOPAREN parser
# NB: OPpHINT_STRICT_REFS must equal HINT_STRICT_REFS
@@ -538,8 +538,8 @@ addbits('entersub',
1 => qw(OPpHINT_STRICT_REFS STRICT), # 'use strict' in scope
2 => qw(OPpENTERSUB_HASTARG TARG ), # Called from OP tree
3 => qw(OPpENTERSUB_AMPER AMPER), # Used & form to call
- 4 => qw(OPpENTERSUB_DB DBG ), # Debug subroutine
- # 5..6 => OPpDEREF, already defined above
+ # 4..5 => OPpDEREF, already defined above
+ 6 => qw(OPpENTERSUB_DB DBG ), # Debug subroutine
# 7 => OPpLVAL_INTRO, already defined above
);
@@ -550,9 +550,9 @@ addbits('rv2cv',
1 => qw(OPpHINT_STRICT_REFS STRICT), # 'use strict' in scope
2 => qw(OPpENTERSUB_HASTARG TARG ), # If const sub, return the const
3 => qw(OPpENTERSUB_AMPER AMPER ), # Used & form to call
- 4 => qw(OPpENTERSUB_DB DBG ), # Debug subroutine
- 6 => qw(OPpMAY_RETURN_CONSTANT CONST ),
+ 5 => qw(OPpMAY_RETURN_CONSTANT CONST ),
+ 6 => qw(OPpENTERSUB_DB DBG ), # Debug subroutine
7 => qw(OPpENTERSUB_NOPAREN NO() ), # bare sub call (without parens)
);
@@ -594,7 +594,7 @@ addbits('rv2gv',
2 => qw(OPpDONT_INIT_GV NOINIT), # Call gv_fetchpv with GV_NOINIT
# (Therefore will return whatever is currently in
# the symbol table, not guaranteed to be a PVGV)
- 4 => qw(OPpALLOW_FAKE FAKE), # OK to return fake glob
+ 6 => qw(OPpALLOW_FAKE FAKE), # OK to return fake glob
);
@@ -720,7 +720,7 @@ addbits('split', 7 => qw(OPpSPLIT_IMPLIM IMPLIM)); # implicit limit
addbits($_,
2 => qw(OPpLVREF_ELEM ELEM ),
3 => qw(OPpLVREF_ITER ITER ),
-'5..6'=> {
+'4..5'=> {
mask_def => 'OPpLVREF_TYPE',
enum => [ qw(
0 OPpLVREF_SV SV