Change 18640 by sky@sky-tibook on 2003/02/02 23:38:40
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!
Affected files ...
... //depot/perl/dump.c#135 edit
... //depot/perl/op.c#534 edit
... //depot/perl/pp_hot.c#302 edit
Differences ...
==== //depot/perl/dump.c#135 (text) ====
Index: perl/dump.c
--- perl/dump.c#134~18600~ Tue Jan 28 21:37:12 2003
+++ perl/dump.c Sun Feb 2 15:38:40 2003
@@ -643,7 +643,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/perl/op.c#534 (text) ====
Index: perl/op.c
--- perl/op.c#533~18599~ Tue Jan 28 13:07:08 2003
+++ perl/op.c Sun Feb 2 15:38:40 2003
@@ -6080,6 +6080,7 @@
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. */
==== //depot/perl/pp_hot.c#302 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#301~18633~ Sun Feb 2 08:48:26 2003
+++ perl/pp_hot.c Sun Feb 2 15:38:40 2003
@@ -2818,7 +2818,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.