diff options
author | Reini Urban <rurban@cpanel.net> | 2016-09-29 14:30:27 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-09-29 17:01:15 +0100 |
commit | 1257c0814cb385a65f4175daa8be8b51e151e4ec (patch) | |
tree | c2c9a651efdbebddea50f90c54bec0b4d447b071 /regen/opcodes | |
parent | 614f2ce4f49414577dec90f8c9bd3f0404bf2ebf (diff) | |
download | perl-1257c0814cb385a65f4175daa8be8b51e151e4ec.tar.gz |
sassign is wrongly declared as BASEOP, not BINOP.
[ DAPM:
To clarify: OP_SASSIGN is always allocated as a BINOP (or occasionally
as a UNOP - see the next commit), but is listed as a BASEOP in
regen/opcodes. Because of this, various bits of code that rely on e.g.
PL_opargs[] have to be special-cased for OP_SASSIGN. This commit changes
the entry in regen/opcodes to list it as BINOP, and removes the
special-casing.
I've also added a temporary workaround marked by XXX to make the commit
work under PERL_OP_PARENT, which is the default now. This will be
removed in a couple if commits' time.
]
This was wrong from the very beginning:
added with 79072805bf lwall perl 5.0 alpha 2 1993 with class s, not 0,
but missing the 2 S S args, which are present in aassign.
Changed to BASEOP with db173bac9b6de7d by mbeattie in 1997.
The '# sassign is special-cased for op class' comment is suspicious.
Fix it in ck_sassign also, it is created as BINOP in newASSIGNOP.
In 202206897 dapm 2014 complained about it also. Remove some special
cases where it should be a BINOP but was not.
Diffstat (limited to 'regen/opcodes')
-rw-r--r-- | regen/opcodes | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/regen/opcodes b/regen/opcodes index 57dd363c1c..6ad9c62fc1 100644 --- a/regen/opcodes +++ b/regen/opcodes @@ -94,9 +94,8 @@ trans transliteration (tr///) ck_match is" S transr transliteration (tr///) ck_match is" S # Lvalue operators. -# sassign is special-cased for op class -sassign scalar assignment ck_sassign s0 +sassign scalar assignment ck_sassign s2 S S aassign list assignment ck_null t2 L L chop chop ck_spair mts% L |