lvref.t: Test ‘Can't modify reference to...’
op.c: diag_listed_as for ‘Can't modify ref’
Use ‘Can’t modify reference to...’ for refassign, too
op.c: Apply spair optimisation to \% \@ \&

The ‘spair’ (scalar/single pair) optimisation applies to a few operat-
ors for which there are actually pairs of ops, one for scalars or sin-
gle items, the other for lists.  refgen is one of them.

When taking references, hashes, arrays and subroutines are single
items, just like scalars, so they can go through the ‘single’ code and
benefit, too.

refassign will also benefit from this, as \@a = [] (not yet imple-
mented) should provide scalar context to the right-hand side, and this
avoids the need for special cases (because srefgen with the initial s
provides scalar context).

(This optimisation could have applied to aggregates passed to cho(m)p,
but it results in incorrect messages like ‘Uninitialized value in sca-
lar chomp’ for chomp @_, so I’ve left it for now.)
Fix assertion failure with ... ? \$a : \$b = ...

Because both branches have a srefgen, this was treated as a scalar
reference assignment, which is usually handled by refassign.  But
refassign expects the thing on the lhs to be srefgen, not a cond_expr.

The logic for propagating the assignment type must not propagate the
‘ASSIGN_REF’ type outward.  Only list context propagates outward.
Eventually, this will be handled by sassign and the cond_expr will
have lvref kids.  (It’s too complicated for refassign, which is the
optimised form that combines \ and = into one op.)

For now, this commit just fixes the assertion failure without making
this type of assignment work yet.
List assignment to lexical scalar refs

\($x,$y)=... does not work yet, but \(my $x) and (\$x, \$y) do.
Make \($x,$y) assignment work

This applies to \ with multiple kids (refgen).  Up till now,
op_lvalue_flags only handled srefgen (single refgen).

Before I was converting srefgen to lvref and nulling the kid op:

  srefgen
    ex-list
      rv2sv
        gv

became:

  lvref
    ex-list
      ex-rv2sv
        gv

Now I’m converting the kid instead and nulling the srefgen:

  ex-srefgen
    ex-list
      lvref
        gv

so that the same code can apply to refgen:

  refgen
    ex-list
      pushmark
      rv2sv
        gv
      rv2sv
        gv

becomes

  ex-refgen
    ex-list
      ex-pushmark
      lvref
        gv
      lvref
        gv
\local $scalar assignment
Assignment to array elem refs
Add lvrefslice op type
lvrefslice gets OPpLVAL_INTRO
pp.c: Dodge compiler warning
\@array[@slice] assignment

plus changes to the aelem tests to check rhs context.

I did \local @a[@s] at the same time, since I was practically copying
and pasting code from aslice (ok, not quite).
\local $a[$ix] assignment
pp.c:pp_lvrefslice: Unused var
pp.c: Consolidate some local aelem code

In the process, avoid a redundant av_fetch for \local$a[0]= and
\local($a[0])=.
Assignment to hash element refs
pp.c: Some branch prediction hints
pp.c: Fold SvIV into S_localise_aelem_lval

All three callers were doing SvIV, so we can do it in one spot.
lvref.t: To-do tests for array ref assignment

The evals are temporary.  Some of the tests don’t even make sense
with the evals; they are more placeholders and reminders for now
that tests.