]> git.vpit.fr Git - perl/modules/autovivification.git/blobdiff - autovivification.xs
In the rpeep replacement, don't check every op for recursion
[perl/modules/autovivification.git] / autovivification.xs
index a6bf2af1c79124370f9a643ee8800b810ea5a81e..7fc4a4e8241656de3dcfd310e2cdb4df03fa5132 100644 (file)
@@ -980,11 +980,22 @@ STATIC void a_peep_rec(pTHX_ OP *o, ptable *seen) {
   const a_op_info *oi = NULL;
   UV flags = 0;
 
+#if !A_HAS_RPEEP
   if (ptable_fetch(seen, o))
    break;
   ptable_seen_store(seen, o, o);
+#endif
 
   switch (o->op_type) {
+#if A_HAS_RPEEP
+   case OP_NEXTSTATE:
+   case OP_DBSTATE:
+   case OP_STUB:
+    if (ptable_fetch(seen, o))
+     return;
+    ptable_seen_store(seen, o, o);
+    break;
+#endif
    case OP_PADSV:
     if (o->op_ppaddr != a_pp_deref) {
      oi = a_map_fetch(o);