From: Artur Bergman Date: Sun, 2 Feb 2003 23:38:40 +0000 (+0000) Subject: Move SvPVIV out of ->op_sv of METHOD_NAMED into the pad, fixes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3848b9623cf7b0bd4a28a02073a51953b168b7a6;p=p5sagit%2Fp5-mst-13.2.git 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! p4raw-id: //depot/perl@18640 --- diff --git a/dump.c b/dump.c index d4d1444..47712e8 100644 --- a/dump.c +++ b/dump.c @@ -643,7 +643,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o) 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: diff --git a/op.c b/op.c index 41bc9d0..610c0e5 100644 --- a/op.c +++ b/op.c @@ -6080,6 +6080,7 @@ Perl_peep(pTHX_ register OP *o) 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. */ diff --git a/pp_hot.c b/pp_hot.c index 8d9625b..57766e8 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -2818,7 +2818,7 @@ PP(pp_method) PP(pp_method_named) { dSP; - SV* sv = cSVOP->op_sv; + SV* sv = cSVOP_sv; U32 hash = SvUVX(sv); XPUSHs(method_common(sv, &hash));