summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFlorian Ragwitz <rafl@debian.org>2010-08-16 00:16:00 +0200
committerFlorian Ragwitz <rafl@debian.org>2010-08-16 00:18:20 +0200
commit666e7765a1af9c81577039073e9ff43b19d9110f (patch)
treeff72f5d3cf5cbe011e1115e67bbe74dfd153b114 /op.c
parent874cd4e1c18d04983efb99e1366ac237240dcd07 (diff)
downloadperl-666e7765a1af9c81577039073e9ff43b19d9110f.tar.gz
Revert "Make the peep recurse via PL_peepp"
This reverts commit 65bfe90c4b4ea5706a50067179e60d4e8de6807a. While it made a few of the things I wanted possible, a couple of other things one might need to do and I thought this change would enable don't actually work. Thanks Zefram for pointing out my mistake. Conflicts: ext/XS-APItest/APItest.xs op.c
Diffstat (limited to 'op.c')
-rw-r--r--op.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/op.c b/op.c
index 08b795416a..5a0962bbb3 100644
--- a/op.c
+++ b/op.c
@@ -103,16 +103,7 @@ recursive, but it's recursive on basic blocks, not on tree nodes.
#include "perl.h"
#include "keywords.h"
-#define CALL_A_PEEP(peep, o) CALL_FPTR((peep)->fn)(aTHX_ o, peep)
-
-#define CALL_PEEP(o) \
- STMT_START { \
- peep_next_t _next_peep; \
- _next_peep.fn = PL_peepp; \
- _next_peep.user_data = NULL; \
- CALL_A_PEEP(&_next_peep, o); \
- } STMT_END
-
+#define CALL_PEEP(o) CALL_FPTR(PL_peepp)(aTHX_ o)
#define CALL_OPFREEHOOK(o) if (PL_opfreehook) CALL_FPTR(PL_opfreehook)(aTHX_ o)
#if defined(PL_OP_SLAB_ALLOC)
@@ -8524,13 +8515,11 @@ S_is_inplace_av(pTHX_ OP *o, OP *oright) {
* peep() is called */
void
-Perl_peep(pTHX_ register OP *o, peep_next_t *next_peep)
+Perl_peep(pTHX_ register OP *o)
{
dVAR;
register OP* oldop = NULL;
- PERL_ARGS_ASSERT_PEEP;
-
if (!o || o->op_opt)
return;
ENTER;
@@ -8725,7 +8714,7 @@ Perl_peep(pTHX_ register OP *o, peep_next_t *next_peep)
sop = fop->op_sibling;
while (cLOGOP->op_other->op_type == OP_NULL)
cLOGOP->op_other = cLOGOP->op_other->op_next;
- CALL_A_PEEP(next_peep, cLOGOP->op_other); /* Recursive calls are not replaced by fptr calls */
+ peep(cLOGOP->op_other); /* Recursive calls are not replaced by fptr calls */
stitch_keys:
o->op_opt = 1;
@@ -8776,20 +8765,20 @@ Perl_peep(pTHX_ register OP *o, peep_next_t *next_peep)
case OP_ONCE:
while (cLOGOP->op_other->op_type == OP_NULL)
cLOGOP->op_other = cLOGOP->op_other->op_next;
- CALL_A_PEEP(next_peep, cLOGOP->op_other); /* Recursive calls are not replaced by fptr calls */
+ peep(cLOGOP->op_other); /* Recursive calls are not replaced by fptr calls */
break;
case OP_ENTERLOOP:
case OP_ENTERITER:
while (cLOOP->op_redoop->op_type == OP_NULL)
cLOOP->op_redoop = cLOOP->op_redoop->op_next;
- CALL_A_PEEP(next_peep, cLOOP->op_redoop);
+ peep(cLOOP->op_redoop);
while (cLOOP->op_nextop->op_type == OP_NULL)
cLOOP->op_nextop = cLOOP->op_nextop->op_next;
- CALL_A_PEEP(next_peep, cLOOP->op_nextop);
+ peep(cLOOP->op_nextop);
while (cLOOP->op_lastop->op_type == OP_NULL)
cLOOP->op_lastop = cLOOP->op_lastop->op_next;
- CALL_A_PEEP(next_peep, cLOOP->op_lastop);
+ peep(cLOOP->op_lastop);
break;
case OP_SUBST:
@@ -8798,7 +8787,7 @@ Perl_peep(pTHX_ register OP *o, peep_next_t *next_peep)
cPMOP->op_pmstashstartu.op_pmreplstart->op_type == OP_NULL)
cPMOP->op_pmstashstartu.op_pmreplstart
= cPMOP->op_pmstashstartu.op_pmreplstart->op_next;
- CALL_A_PEEP(next_peep, cPMOP->op_pmstashstartu.op_pmreplstart);
+ peep(cPMOP->op_pmstashstartu.op_pmreplstart);
break;
case OP_EXEC: