summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-11-05 01:36:17 +0000
committerSteve Peters <steve@fisharerojo.org>2005-11-05 01:36:17 +0000
commitc960fc3b3086016b5cf3008030dd5aa01b2db20d (patch)
tree5f1a5837918aa2b472668295912d44b609ff04c1 /pp_hot.c
parente5105eda9ec104fa4cd12906af09da2e3a0c3386 (diff)
downloadperl-c960fc3b3086016b5cf3008030dd5aa01b2db20d.tar.gz
Merge pp_andassign, pp_orassign, and pp_dorassign into pp_and,
pp_or, and pp_defined, respectively. p4raw-id: //depot/perl@26007
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/pp_hot.c b/pp_hot.c
index ef20f9e8b3..967f2d5a89 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -100,7 +100,8 @@ PP(pp_and)
if (!SvTRUE(TOPs))
RETURN;
else {
- --SP;
+ if (PL_op->op_type == OP_AND)
+ --SP;
RETURNOP(cLOGOP->op_other);
}
}
@@ -319,7 +320,8 @@ PP(pp_or)
if (SvTRUE(TOPs))
RETURN;
else {
- --SP;
+ if (PL_op->op_type == OP_OR)
+ --SP;
RETURNOP(cLOGOP->op_other);
}
}
@@ -331,7 +333,7 @@ PP(pp_defined)
bool defined = FALSE;
const int op_type = PL_op->op_type;
- if(op_type == OP_DOR) {
+ if(op_type == OP_DOR || op_type == OP_DORASSIGN) {
sv = TOPs;
if (!sv || !SvANY(sv)) {
--SP;
@@ -362,17 +364,15 @@ PP(pp_defined)
defined = TRUE;
}
- if(defined) {
- if(op_type == OP_DOR)
- RETURN;
- else if (op_type == OP_DEFINED)
- RETPUSHYES;
- }
-
- if(op_type == OP_DOR) {
- --SP;
+ if(op_type == OP_DOR || op_type == OP_DORASSIGN) {
+ if(defined)
+ RETURN;
+ if(op_type == OP_DOR)
+ --SP;
RETURNOP(cLOGOP->op_other);
} else if (op_type == OP_DEFINED) {
+ if(defined)
+ RETPUSHYES;
RETPUSHNO;
}
}