summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-02-04 14:52:01 +0000
committerDavid Mitchell <davem@iabyn.com>2019-02-05 14:03:05 +0000
commit9b2983ca78e5369d17559ca0aa5af58e9da3724a (patch)
treeb0b0b2e2204aabb0d5e0a57af5e45def79beb979 /gv.c
parent7554d34485b417b08875137130152d0168feefa8 (diff)
downloadperl-9b2983ca78e5369d17559ca0aa5af58e9da3724a.tar.gz
Perl_try_amagic_bin(): eliminate dATARGET
.. and replace with explicit tests and assigns to targ. This macro includes an OPf_STACKED test which has already been done above. Also, by protecting the OPf_STACKED test within a AMGf_assign test, we can eliminate the AMGf_set flag in the next commit, and use the same set of code for both AMGf_set and AMGf_assign variant calls to Perl_try_amagic_bin().
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 7808c53c8e..683a9f0cff 100644
--- a/gv.c
+++ b/gv.c
@@ -3018,7 +3018,6 @@ Perl_try_amagic_bin(pTHX_ int method, int flags) {
SETs(tmpsv);
}
else {
- dATARGET;
(void)POPs;
/* where the op is one of the two forms:
* $x op= $y
@@ -3030,6 +3029,8 @@ Perl_try_amagic_bin(pTHX_ int method, int flags) {
|| ( (PL_opargs[PL_op->op_type] & OA_TARGLEX)
&& (PL_op->op_private & OPpTARGET_MY)))
{
+ dTARG;
+ TARG = mutator ? *SP : PAD_SV(PL_op->op_targ);
sv_setsv(TARG, tmpsv);
SETTARG;
}