Change 18646 by jhi@kosh on 2003/02/03 12:54:10

        Integrate:
        [ 18640]
        Move SvPVIV out of ->op_sv of METHOD_NAMED into the pad, fixes
        threading issue. Should perhaps be a PVOP to save memory, but then
        we have nowhere to store the hash of the function!
        
        [ 18641]
        In any case, never copy this but use the same SV since
        if we copy we loose the hash we so badly need.
        For op_const we might still need to copy however.
        
        [ 18644]
        Duh, test -e ENOPORTABLE, I should've remembered that.
        (Made Solaris go boom.)

Affected files ...

... //depot/maint-5.8/perl/Configure#14 integrate
... //depot/maint-5.8/perl/dump.c#9 integrate
... //depot/maint-5.8/perl/op.c#8 integrate
... //depot/maint-5.8/perl/pp_hot.c#10 integrate

Differences ...

==== //depot/maint-5.8/perl/Configure#14 (xtext) ====
Index: perl/Configure
--- perl/Configure#13~18638~    Sun Feb  2 12:26:13 2003
+++ perl/Configure      Mon Feb  3 04:54:10 2003
@@ -47,7 +47,7 @@
 (exit $?0) || exec sh $0 $argv:q
 rm -f c1$$ c2$$
 
-if test -e /dev/cputype -a -e /dev/drivers -a -e /dev/osversion -a -e /dev/bintime; 
then
+if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
        cat >&4 <<EOF
 ***
 *** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do

==== //depot/maint-5.8/perl/dump.c#9 (text) ====
Index: perl/dump.c
--- perl/dump.c#8~18567~        Wed Jan 22 10:37:55 2003
+++ perl/dump.c Mon Feb  3 04:54:10 2003
@@ -646,7 +646,7 @@
        break;
     case OP_CONST:
     case OP_METHOD_NAMED:
-       Perl_dump_indent(aTHX_ level, file, "SV = %s\n", SvPEEK(cSVOPo->op_sv));
+       Perl_dump_indent(aTHX_ level, file, "SV = %s\n", SvPEEK(cSVOPo_sv));
        break;
     case OP_SETSTATE:
     case OP_NEXTSTATE:

==== //depot/maint-5.8/perl/op.c#8 (text) ====
Index: perl/op.c
--- perl/op.c#7~18617~  Sat Feb  1 12:05:08 2003
+++ perl/op.c   Mon Feb  3 04:54:10 2003
@@ -7057,12 +7057,13 @@
            if (cSVOPo->op_private & OPpCONST_STRICT)
                no_bareword_allowed(o);
 #ifdef USE_ITHREADS
+       case OP_METHOD_NAMED:
            /* Relocate sv to the pad for thread safety.
             * Despite being a "constant", the SV is written to,
             * for reference counts, sv_upgrade() etc. */
            if (cSVOP->op_sv) {
                PADOFFSET ix = pad_alloc(OP_CONST, SVs_PADTMP);
-               if (SvPADTMP(cSVOPo->op_sv)) {
+               if (o->op_type == OP_CONST && SvPADTMP(cSVOPo->op_sv)) {
                    /* If op_sv is already a PADTMP then it is being used by
                     * some pad, so make a copy. */
                    sv_setsv(PL_curpad[ix],cSVOPo->op_sv);

==== //depot/maint-5.8/perl/pp_hot.c#10 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#9~18638~      Sun Feb  2 12:26:13 2003
+++ perl/pp_hot.c       Mon Feb  3 04:54:10 2003
@@ -3045,7 +3045,7 @@
 PP(pp_method_named)
 {
     dSP;
-    SV* sv = cSVOP->op_sv;
+    SV* sv = cSVOP_sv;
     U32 hash = SvUVX(sv);
 
     XPUSHs(method_common(sv, &hash));
End of Patch.

Reply via email to