]> git.vpit.fr Git - perl/modules/Sub-Op.git/commitdiff
linklist() doesn't seem to do any good
authorVincent Pit <vince@profvince.com>
Sat, 2 Jan 2010 00:12:13 +0000 (01:12 +0100)
committerVincent Pit <vince@profvince.com>
Sat, 2 Jan 2010 00:12:13 +0000 (01:12 +0100)
Op.xs

diff --git a/Op.xs b/Op.xs
index 8b761adfab1044a113921842b16003c5e56c0b00..7b35b4a3c9a0e837dc260a351dae163c64ef2cca 100644 (file)
--- a/Op.xs
+++ b/Op.xs
@@ -138,37 +138,6 @@ void sub_op_register(pTHX_ const sub_op_keyword *k) {
 
 /* --- Private helpers ----------------------------------------------------- */
 
-#define SO_LINKLIST(O) ((O)->op_next ? (O)->op_next : sub_op_linklist(O))
-
-STATIC OP *sub_op_linklist(pTHX_ OP *o) {
-#define sub_op_linklist(O) sub_op_linklist(aTHX_ (O))
-    OP *first;
-
-    if (o->op_next)
-        return o->op_next;
-
-    /* establish postfix order */
-    first = cUNOPo->op_first;
-    if (first) {
-        register OP *kid;
-        o->op_next = SO_LINKLIST(first);
-        kid = first;
-        for (;;) {
-            if (kid->op_sibling) {
-                kid->op_next = SO_LINKLIST(kid->op_sibling);
-                kid = kid->op_sibling;
-            } else {
-                kid->op_next = o;
-                break;
-            }
-        }
-    }
-    else
-        o->op_next = o;
-
-    return o->op_next;
-}
-
 STATIC IV sub_op_hint(pTHX) {
 #define sub_op_hint() sub_op_hint(aTHX)
  SV *hint;
@@ -271,8 +240,6 @@ STATIC OP *sub_op_ck_entersub(pTHX_ OP *o) {
     }
    }
 
-   sub_op_linklist(o);
-
    {
     sub_op_name_t *on = PerlMemShared_malloc(sizeof(*on) + len);
     Copy(name, &on->buf, len, char);