Transform the loop in rpeep that handles the undeferred ops
authorVincent Pit <vince@profvince.com>
Mon, 18 Jul 2011 22:22:31 +0000 (00:22 +0200)
committerVincent Pit <vince@profvince.com>
Mon, 18 Jul 2011 22:22:53 +0000 (00:22 +0200)
Following commit f11ca51e41e898a77f1fd33b9e0371e69b1be73a, it is possible
to rewrite this loop to make it slightly more readable.

There should be no functional changes.

op.c

diff --git a/op.c b/op.c
index 6a94db4..ab65490 100644 (file)
--- a/op.c
+++ b/op.c
@@ -9335,13 +9335,11 @@ Perl_rpeep(pTHX_ register OP *o)
     for (;; o = o->op_next) {
        if (o && o->op_opt)
            o = NULL;
-       while (!o) {
-           if (defer_ix < 0)
-               break;
-           CALL_RPEEP(defer_queue[(defer_base + defer_ix--) % MAX_DEFERRED]);
-       }
-       if (!o)
+       if (!o) {
+           while (defer_ix >= 0)
+               CALL_RPEEP(defer_queue[(defer_base + defer_ix--) % MAX_DEFERRED]);
            break;
+       }
 
 #if defined(PERL_MAD) && defined(USE_ITHREADS)
        MADPROP *mp = o->op_madprop;