This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate pp_threadsv, as it was only ever used by 5005 threads.
authorNicholas Clark <nick@ccl4.org>
Mon, 8 Jan 2007 23:27:26 +0000 (23:27 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 8 Jan 2007 23:27:26 +0000 (23:27 +0000)
p4raw-id: //depot/perl@29727

dump.c
ext/Opcode/Opcode.pm
op.c
opcode.h
opcode.pl
opnames.h
pp.sym
pp_proto.h

diff --git a/dump.c b/dump.c
index 1972eff..ea81ce8 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -923,10 +923,6 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o)
            if (o->op_private & OPpSORT_REVERSE)
                sv_catpv(tmpsv, ",REVERSE");
        }
-       else if (optype == OP_THREADSV) {
-           if (o->op_private & OPpDONE_SVREF)
-               sv_catpv(tmpsv, ",SVREF");
-       }
        else if (optype == OP_OPEN || optype == OP_BACKTICK) {
            if (o->op_private & OPpOPEN_IN_RAW)
                sv_catpv(tmpsv, ",IN_RAW");
@@ -2664,10 +2660,6 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o)
            if (o->op_private & OPpSORT_REVERSE)
                sv_catpv(tmpsv, ",REVERSE");
        }
-       else if (o->op_type == OP_THREADSV) {
-           if (o->op_private & OPpDONE_SVREF)
-               sv_catpv(tmpsv, ",SVREF");
-       }
        else if (o->op_type == OP_OPEN || o->op_type == OP_BACKTICK) {
            if (o->op_private & OPpOPEN_IN_RAW)
                sv_catpv(tmpsv, ",IN_RAW");
index 2404dca..804759a 100644 (file)
@@ -439,7 +439,7 @@ beyond the scope of the compartment.
 
 These ops are related to multi-threading.
 
-    lock threadsv
+    lock
 
 =item :default
 
diff --git a/op.c b/op.c
index a21eb5d..a495db8 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1551,10 +1551,6 @@ Perl_doref(pTHX_ OP *o, I32 type, bool set_op_ref)
        }
        break;
 
-    case OP_THREADSV:
-       o->op_flags |= OPf_MOD;         /* XXX ??? */
-       break;
-
     case OP_RV2AV:
     case OP_RV2HV:
        if (set_op_ref)
@@ -4515,17 +4511,6 @@ Perl_newFOROP(pTHX_ I32 flags, char *label, line_t forline, OP *sv, OP *expr, OP
            }
            sv = NULL;
        }
-       else if (sv->op_type == OP_THREADSV) { /* per-thread variable */
-           padoff = sv->op_targ;
-           if (PL_madskills)
-               madsv = sv;
-           else {
-               sv->op_targ = 0;
-               iterflags |= OPf_SPECIAL;
-               op_free(sv);
-           }
-           sv = NULL;
-       }
        else
            Perl_croak(aTHX_ "Can't use %s for loop variable", PL_op_desc[sv->op_type]);
        if (padoff) {
@@ -5873,10 +5858,6 @@ Perl_newSVREF(pTHX_ OP *o)
        o->op_ppaddr = PL_ppaddr[OP_PADSV];
        return o;
     }
-    else if (o->op_type == OP_THREADSV && !(o->op_flags & OPpDONE_SVREF)) {
-       o->op_flags |= OPpDONE_SVREF;
-       return o;
-    }
     return newUNOP(OP_RV2SV, 0, scalar(o));
 }
 
@@ -7530,8 +7511,7 @@ Perl_ck_subr(pTHX_ OP *o)
                    if (o3->op_type == OP_RV2SV ||
                        o3->op_type == OP_PADSV ||
                        o3->op_type == OP_HELEM ||
-                       o3->op_type == OP_AELEM ||
-                       o3->op_type == OP_THREADSV)
+                       o3->op_type == OP_AELEM)
                         goto wrapref;
                    if (!contextclass)
                        bad_type(arg, "scalar", gv_ename(namegv), o3);
index de5cc57..f2a898f 100644 (file)
--- a/opcode.h
+++ b/opcode.h
@@ -2,8 +2,8 @@
  *
  *    opcode.h
  *
- *    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2003, 2004, 2005, 2006 by Larry Wall and others
+ *    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ *    2001, 2002, 2003, 2004, 2005, 2006, 2007 by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -381,7 +381,6 @@ EXTCONST char* const PL_op_name[] = {
        "getlogin",
        "syscall",
        "lock",
-       "threadsv",
        "setstate",
        "method_named",
        "dor",
@@ -750,7 +749,6 @@ EXTCONST char* const PL_op_desc[] = {
        "getlogin",
        "syscall",
        "lock",
-       "per-thread value",
        "set statement info",
        "method with known name",
        "defined or (//)",
@@ -1133,7 +1131,6 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
        MEMBER_TO_FPTR(Perl_pp_getlogin),
        MEMBER_TO_FPTR(Perl_pp_syscall),
        MEMBER_TO_FPTR(Perl_pp_lock),
-       MEMBER_TO_FPTR(Perl_unimplemented_op),  /* Perl_pp_threadsv */
        MEMBER_TO_FPTR(Perl_pp_setstate),
        MEMBER_TO_FPTR(Perl_pp_method_named),
        MEMBER_TO_FPTR(Perl_pp_defined),        /* Perl_pp_dor */
@@ -1512,7 +1509,6 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */
        MEMBER_TO_FPTR(Perl_ck_null),   /* getlogin */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* syscall */
        MEMBER_TO_FPTR(Perl_ck_rfun),   /* lock */
-       MEMBER_TO_FPTR(Perl_ck_null),   /* threadsv */
        MEMBER_TO_FPTR(Perl_ck_null),   /* setstate */
        MEMBER_TO_FPTR(Perl_ck_null),   /* method_named */
        MEMBER_TO_FPTR(Perl_ck_null),   /* dor */
@@ -1886,7 +1882,6 @@ EXTCONST U32 PL_opargs[] = {
        0x0000000c,     /* getlogin */
        0x0004281d,     /* syscall */
        0x0000f604,     /* lock */
-       0x00000044,     /* threadsv */
        0x00001404,     /* setstate */
        0x00000c40,     /* method_named */
        0x00000600,     /* dor */
index fbb27ff..ef51941 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -40,7 +40,7 @@ my %alias;
 # Format is "this function" => "does these op names"
 my @raw_alias = (
                 Perl_do_kv => [qw( keys values )],
-                Perl_unimplemented_op => [qw(padany threadsv mapstart)],
+                Perl_unimplemented_op => [qw(padany mapstart)],
                 # All the ops with a body of { return NORMAL; }
                 Perl_pp_null => [qw(scalar regcmaybe lineseq scope)],
 
@@ -1028,7 +1028,6 @@ syscall           syscall                 ck_fun          imst@   S L
 
 # For multi-threading
 lock           lock                    ck_rfun         s%      R
-threadsv       per-thread value        ck_null         ds0
 
 # Control (contd.)
 setstate       set statement info      ck_null         s;
index fa521a4..d40140d 100644 (file)
--- a/opnames.h
+++ b/opnames.h
@@ -3,7 +3,7 @@
  *    opnames.h
  *
  *    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- *    by Larry Wall and others
+ *    2007 by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -363,24 +363,23 @@ typedef enum opcode {
        OP_GETLOGIN,    /* 345 */
        OP_SYSCALL,     /* 346 */
        OP_LOCK,        /* 347 */
-       OP_THREADSV,    /* 348 */
-       OP_SETSTATE,    /* 349 */
-       OP_METHOD_NAMED,/* 350 */
-       OP_DOR,         /* 351 */
-       OP_DORASSIGN,   /* 352 */
-       OP_ENTERGIVEN,  /* 353 */
-       OP_LEAVEGIVEN,  /* 354 */
-       OP_ENTERWHEN,   /* 355 */
-       OP_LEAVEWHEN,   /* 356 */
-       OP_BREAK,       /* 357 */
-       OP_CONTINUE,    /* 358 */
-       OP_SMARTMATCH,  /* 359 */
-       OP_SAY,         /* 360 */
-       OP_CUSTOM,      /* 361 */
+       OP_SETSTATE,    /* 348 */
+       OP_METHOD_NAMED,/* 349 */
+       OP_DOR,         /* 350 */
+       OP_DORASSIGN,   /* 351 */
+       OP_ENTERGIVEN,  /* 352 */
+       OP_LEAVEGIVEN,  /* 353 */
+       OP_ENTERWHEN,   /* 354 */
+       OP_LEAVEWHEN,   /* 355 */
+       OP_BREAK,       /* 356 */
+       OP_CONTINUE,    /* 357 */
+       OP_SMARTMATCH,  /* 358 */
+       OP_SAY,         /* 359 */
+       OP_CUSTOM,      /* 360 */
        OP_max          
 } opcode;
 
-#define MAXO 362
+#define MAXO 361
 #define OP_phoney_INPUT_ONLY -1
 #define OP_phoney_OUTPUT_ONLY -2
 
diff --git a/pp.sym b/pp.sym
index e2bff2c..428fc30 100644 (file)
--- a/pp.sym
+++ b/pp.sym
@@ -391,7 +391,6 @@ Perl_pp_egrent
 Perl_pp_getlogin
 Perl_pp_syscall
 Perl_pp_lock
-Perl_pp_threadsv
 Perl_pp_setstate
 Perl_pp_method_named
 Perl_pp_dor
index f6cfb74..1df3af7 100644 (file)
@@ -392,7 +392,6 @@ PERL_PPDEF(Perl_pp_egrent)
 PERL_PPDEF(Perl_pp_getlogin)
 PERL_PPDEF(Perl_pp_syscall)
 PERL_PPDEF(Perl_pp_lock)
-PERL_PPDEF(Perl_pp_threadsv)
 PERL_PPDEF(Perl_pp_setstate)
 PERL_PPDEF(Perl_pp_method_named)
 PERL_PPDEF(Perl_pp_dor)