summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Leach <richardleach@users.noreply.github.com>2021-08-10 23:30:09 +0100
committerTony Cook <tony@develop-help.com>2021-08-17 15:25:57 +1000
commitc243917ec3550cb982f033b448e4b740498dc53a (patch)
tree913fac1c3e33841b07ed41b13ddcb0c11cce0308
parent166d28949836188fae86b44eae7fb11a6d84e091 (diff)
downloadperl-c243917ec3550cb982f033b448e4b740498dc53a.tar.gz
pp_defined: modify OP_DEFINED paths to use TOPs and RETSETs
-rw-r--r--pp_hot.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/pp_hot.c b/pp_hot.c
index fcc5e14454..6e7e384f18 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -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;
}