From: Adrian M. Enache Date: Thu, 4 Sep 2003 20:09:06 +0000 (+0300) Subject: Re: [PATCH] Re: ByteLoader and MSWin32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=47682f07932a6dd9025c454470244440249a844b;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Re: ByteLoader and MSWin32 Message-ID: <20030904170906.GA1235@ratsnest.hole> p4raw-id: //depot/perl@21032 --- diff --git a/bytecode.pl b/bytecode.pl index bfe7502..c3c3dc7 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -452,7 +452,7 @@ op_pmreplroot cPMOP->op_pmreplroot opindex op_pmreplstart cPMOP->op_pmreplstart opindex op_pmnext *(OP**)&cPMOP->op_pmnext opindex #ifdef USE_ITHREADS -op_pmstashpv cPMOP->op_pmstashpv pvindex +op_pmstashpv cPMOP pvindex x op_pmreplrootpo cPMOP->op_pmreplroot OP*/PADOFFSET #else op_pmstash *(SV**)&cPMOP->op_pmstash svindex diff --git a/ext/B/B/Bytecode.pm b/ext/B/B/Bytecode.pm index 8580885..cce9948 100644 --- a/ext/B/B/Bytecode.pm +++ b/ext/B/B/Bytecode.pm @@ -735,15 +735,17 @@ sub compile { } if ($scan) { my $f; - open $f, $scan - or bwarn("cannot rescan '$_'"), next; - while (<$f>) { - /^#\s*line\s+\d+\s+("?)(.*)\1/ and $files{$2} = 1; - /^#/ and next; - if (/\bgoto\b/ && !$keep_syn) { - bwarn "keeping the syntax tree: \"goto\" op found"; - keep_syn; + if (open $f, $scan) { + while (<$f>) { + /^#\s*line\s+\d+\s+("?)(.*)\1/ and $files{$2} = 1; + /^#/ and next; + if (/\bgoto\b\s*[^&]/ && !$keep_syn) { + bwarn "keeping the syntax tree: \"goto\" op found"; + keep_syn; + } } + } else { + bwarn "cannot rescan '$scan'"; } close $f; } diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h index 667de7d..0224625 100644 --- a/ext/ByteLoader/bytecode.h +++ b/ext/ByteLoader/bytecode.h @@ -215,6 +215,8 @@ typedef char *pvindex; return 0; \ } STMT_END +#define BSET_op_pmstashpv(op, arg) PmopSTASHPV_set(op, arg) + /* * stolen from toke.c: better if that was a function. * in toke.c there are also #ifdefs for dosish systems and i/o layers diff --git a/ext/ByteLoader/byterun.c b/ext/ByteLoader/byterun.c index c93b6cd..af55af6 100644 --- a/ext/ByteLoader/byterun.c +++ b/ext/ByteLoader/byterun.c @@ -817,7 +817,7 @@ byterun(pTHX_ register struct byteloader_state *bstate) { pvindex arg; BGET_pvindex(arg); - cPMOP->op_pmstashpv = arg; + BSET_op_pmstashpv(cPMOP, arg); break; } case INSN_OP_PMREPLROOTPO: /* 109 */