summaryrefslogtreecommitdiff
path: root/pp_hot.c
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_hot.c
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_hot.c')
-rw-r--r--pp_hot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 39aef72f7c..fd439a5e4b 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1257,7 +1257,7 @@ PP(pp_eq)
dSP;
SV *left, *right;
- tryAMAGICbin_MG(eq_amg, AMGf_set|AMGf_numeric);
+ tryAMAGICbin_MG(eq_amg, AMGf_numeric);
right = POPs;
left = TOPs;
SETs(boolSV(