diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-11-07 21:42:54 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-08 00:33:02 -0800 |
commit | 9e209402444aedd210f045f2557e631ca974dda2 (patch) | |
tree | 12c25fcabc85fdb8e4a819c33b4ff9fc6f65a51e /regen | |
parent | 68606d04067f960af540499bbdd712185cb9a125 (diff) | |
download | perl-9e209402444aedd210f045f2557e631ca974dda2.tar.gz |
Renumber op flags so TARGET_MY and OUR_INTRO differ
I need split to be able to take both flags. Renumbering OUR_INTRO
sets off a chain reaction requiring that various other flags be renum-
bered. These are the affected ops:
gvsv rv2sv rv2av rv2hv enteriter split rv2gv padsv aelem helem entersub padav padhv lvavref lvref refassign pushmark rv2cv
----------------------------------------------------------------------------------------------------------------------------------
0 inargs
1 strct strct strct strct strct strct
2 slicw silcw reversed noinit targ slicw slicw elem elem targ
3 lvsub lvsub def lvsub lvsub lvsub amper lvsub lvsub iter iter amper
4 our our our our our our fake state defer defer dbg state state state state state state dbg
5-6 dref bool dref dref dref dref dref bool type type const(6)
7 intro intro intro intro intro implim intro intro intro intro intro intro intro intro intro intro intro nopar
If we use 6 for OUR_INTRO and shift 5-6 down to 4-5, that frees up 4
(aka OPpTARGET_MY) for use on split.
op.c:scalarvoid was testing the OPpOUR_INTRO flag on ops that don’t
take it, so it needed adjustment.
Diffstat (limited to 'regen')
-rw-r--r-- | regen/op_private | 32 |
1 files changed, 16 insertions, 16 deletions
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 |