From: Dave Mitchell Date: Fri, 24 Jan 2003 18:44:19 +0000 (+0000) Subject: OPf_SPECIAL on OP_DBSTATE now indicates a breakpoint. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5df8de69806210bf48dc2e451e3db37c6f274c6e;p=p5sagit%2Fp5-mst-13.2.git OPf_SPECIAL on OP_DBSTATE now indicates a breakpoint. Subject: Re: [PATCH] Re: change #9754: 5 x slowdown for perl -d Message-ID: <20030124184419.F11179@fdgroup.com> p4raw-id: //depot/perl@18589 --- diff --git a/mg.c b/mg.c index 0e34080..fae5cda 100644 --- a/mg.c +++ b/mg.c @@ -1458,8 +1458,13 @@ Perl_magic_setdbline(pTHX_ SV *sv, MAGIC *mg) i = SvTRUE(sv); svp = av_fetch(GvAV(gv), atoi(MgPV(mg,n_a)), FALSE); - if (svp && SvIOKp(*svp) && (o = INT2PTR(OP*,SvIVX(*svp)))) - o->op_private = (U8)i; + if (svp && SvIOKp(*svp) && (o = INT2PTR(OP*,SvIVX(*svp)))) { + /* set or clear breakpoint in the relevant control op */ + if (i) + o->op_flags |= OPf_SPECIAL; + else + o->op_flags &= ~OPf_SPECIAL; + } return 0; } diff --git a/op.h b/op.h index 323a487..7f9adc2 100644 --- a/op.h +++ b/op.h @@ -97,6 +97,8 @@ Deprecated. Use C instead. /* On regcomp, "use re 'eval'" was in scope */ /* On OP_READLINE, was <$filehandle> */ /* On RV2[SG]V, don't create GV--in defined()*/ + /* On OP_DBSTATE, indicates breakpoint + * (runtime property) */ /* old names; don't use in new code, but don't break them, either */ #define OPf_LIST OPf_WANT_LIST diff --git a/pp_ctl.c b/pp_ctl.c index 1a3fd1d..2e302ed 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1583,7 +1583,8 @@ PP(pp_dbstate) PL_stack_sp = PL_stack_base + cxstack[cxstack_ix].blk_oldsp; FREETMPS; - if (PL_op->op_private || SvIV(PL_DBsingle) || SvIV(PL_DBsignal) || SvIV(PL_DBtrace)) + if (PL_op->op_flags & OPf_SPECIAL /* breakpoint */ + || SvIV(PL_DBsingle) || SvIV(PL_DBsignal) || SvIV(PL_DBtrace)) { dSP; register CV *cv;