Skip Menu |
 

This queue is for tickets about the optimizer CPAN distribution.

Report information
The Basics
Id: 23029
Status: new
Priority: 0/
Queue: optimizer

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.05
Fixed in: (no value)



Subject: Fixing optimizer for modern Perl + ithreads
Download (untitled) / with headers
text/plain 179b
optimizer.pm don't work so good with 5.8.8 + ithreads. The attached patch makes the necessary changes, mostly adding aTHX and Perl_ prefixes, to get it to compile and pass tests.
Subject: optimizer.patch
Download optimizer.patch
text/x-diff 1.9k
--- optimizer.xs 2006/11/12 04:39:20 1.1 +++ optimizer.xs 2006/11/12 04:58:14 @@ -1,6 +1,7 @@ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#include "ppport.h" /* We have to steal a bunch of code from B.xs so that we can generate B objects from ops. Disturbing but true. */ @@ -137,7 +138,7 @@ * Despite being a "constant", the SV is written to, * for reference counts, sv_upgrade() etc. */ if (o->op_sv) { - PADOFFSET ix = pad_alloc(OP_CONST, SVs_PADTMP); + PADOFFSET ix = Perl_pad_alloc(aTHX_ OP_CONST, SVs_PADTMP); if (SvPADTMP(o->op_sv)) { /* If op_sv is already a PADTMP then it is being used by * some pad, so make a copy. */ @@ -162,9 +163,9 @@ STATIC void no_bareword_allowed(pTHX_ OP *o) { - qerror(Perl_mess(aTHX_ - "Bareword \"%s\" not allowed while \"strict subs\" in use", - SvPV_nolen(cSVOPo_sv))); + Perl_qerror(aTHX_ Perl_mess(aTHX_ + "Bareword \"%s\" not allowed while \"strict subs\" in use", + SvPV_nolen(cSVOPo_sv))); } void @@ -176,7 +177,7 @@ if (!o || o->op_seq) return; ENTER; - SAVEOP(); + Perl_save_op(aTHX); SAVEVPTR(PL_curcop); for (; o; o = o->op_next) { if (o->op_seq) @@ -200,7 +201,7 @@ * 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); + PADOFFSET ix = Perl_pad_alloc(aTHX_ OP_CONST, SVs_PADTMP); if (SvPADTMP(cSVOPo->op_sv)) { /* If op_sv is already a PADTMP then it is being used by * some pad, so make a copy. */ @@ -535,7 +536,7 @@ by the fact that doing stuff while optimization is highly dangerous */ - peep(o); + Perl_peep(aTHX_ o); /* Since we get the start here, we should try and find the leave by following next until we find it


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.