summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-02-04 15:07:11 +0000
committerDavid Mitchell <davem@iabyn.com>2019-02-05 14:03:05 +0000
commit0872de45fff4b1f6c17e1d5bec82d3d5095801a2 (patch)
treedf3784390ce43b1f7a0b401f97bde5136fe7f408 /pp.h
parent9b2983ca78e5369d17559ca0aa5af58e9da3724a (diff)
downloadperl-0872de45fff4b1f6c17e1d5bec82d3d5095801a2.tar.gz
Eliminate AMGf_set flag
I added this flag a few years ago when I revamped the overload macros tryAMAGICbin() etc. It allowed two different classes of macros to share the same functions (Perl_try_amagic_un/Perl_try_amagic_bin) by indicating what type of action is required. However, the last few commits have made those two functions able to robustly always determine whether its an assign-type action ($x op= $y or $lex = $x op $x) or a plain set-result-on-stack operation ($x op $y). So eliminate this flag. Note that this makes the ops which have the AMGf_set flag hard-coded infinitesimally slower, since Perl_try_amagic_bin no longer skips the checks for assign-ness. But compared with the overhead of having already called the overload method, this is is trivial. On the plus side, it makes the code smaller and easier to understand.
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.h b/pp.h
index 61e26c5dc8..98540be682 100644
--- a/pp.h
+++ b/pp.h
@@ -556,7 +556,7 @@ Does not use C<TARG>. See also C<L</XPUSHu>>, C<L</mPUSHu>> and C<L</PUSHu>>.
#define AMGf_assign 4 /* op supports mutator variant, e.g. $x += 1 */
#define AMGf_unary 8
#define AMGf_numeric 0x10 /* for Perl_try_amagic_bin */
-#define AMGf_set 0x20 /* for Perl_try_amagic_bin */
+
#define AMGf_want_list 0x40
#define AMGf_numarg 0x80