diff options
author | Richard Leach <richardleach@users.noreply.github.com> | 2021-08-10 23:30:09 +0100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2021-08-17 15:25:57 +1000 |
commit | c243917ec3550cb982f033b448e4b740498dc53a (patch) | |
tree | 913fac1c3e33841b07ed41b13ddcb0c11cce0308 /pp_hot.c | |
parent | 166d28949836188fae86b44eae7fb11a6d84e091 (diff) | |
download | perl-c243917ec3550cb982f033b448e4b740498dc53a.tar.gz |
pp_defined: modify OP_DEFINED paths to use TOPs and RETSETs
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -1346,14 +1346,13 @@ PP(pp_or) PP(pp_defined) { dSP; - SV* sv; - bool defined; + SV* sv = TOPs; + bool defined = FALSE; const int op_type = PL_op->op_type; const bool is_dor = (op_type == OP_DOR || op_type == OP_DORASSIGN); if (is_dor) { PERL_ASYNC_CHECK(); - sv = TOPs; if (UNLIKELY(!sv || !SvANY(sv))) { if (op_type == OP_DOR) --SP; @@ -1362,12 +1361,10 @@ PP(pp_defined) } else { /* OP_DEFINED */ - sv = POPs; if (UNLIKELY(!sv || !SvANY(sv))) - RETPUSHNO; + RETSETNO; } - defined = FALSE; if (UNLIKELY(SvTYPE(sv) == SVt_PVCV)) { if (CvROOT(sv) || CvXSUB(sv)) defined = TRUE; @@ -1387,8 +1384,8 @@ PP(pp_defined) } /* assuming OP_DEFINED */ if(defined) - RETPUSHYES; - RETPUSHNO; + RETSETYES; + RETSETNO; } |