diff options
author | Richard Leach <richardleach@users.noreply.github.com> | 2020-06-02 22:48:06 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-07-30 15:30:46 -0600 |
commit | fe9826e33c11ebd16105e6edec6ba6f7196e6629 (patch) | |
tree | 83d1b83b75af1205a18ff56a4d0403562d33f807 /pp_hot.c | |
parent | e02f7c069a8e7dd98b0ec010e9b3c6619b46baf3 (diff) | |
download | perl-fe9826e33c11ebd16105e6edec6ba6f7196e6629.tar.gz |
pp.c/pp_hot.c - add NV<->NV case to numerical comparison ops
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1262,14 +1262,20 @@ PP(pp_eq) { dSP; SV *left, *right; + U32 flags_and, flags_or; tryAMAGICbin_MG(eq_amg, AMGf_numeric); right = POPs; left = TOPs; + flags_and = SvFLAGS(left) & SvFLAGS(right); + flags_or = SvFLAGS(left) | SvFLAGS(right); + SETs(boolSV( - (SvIOK_notUV(left) && SvIOK_notUV(right)) - ? (SvIVX(left) == SvIVX(right)) - : ( do_ncmp(left, right) == 0) + ( (flags_and & SVf_IOK) && ((flags_or & SVf_IVisUV) ==0 ) ) + ? (SvIVX(left) == SvIVX(right)) + : (flags_and & SVf_NOK) + ? (SvNVX(left) == SvNVX(right)) + : ( do_ncmp(left, right) == 0) )); RETURN; } |