This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
OPf_SPECIAL on OP_DBSTATE now indicates a breakpoint.
authorDave Mitchell <davem@fdisolutions.com>
Fri, 24 Jan 2003 18:44:19 +0000 (18:44 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 26 Jan 2003 13:06:49 +0000 (13:06 +0000)
Subject: Re: [PATCH] Re: change #9754: 5 x slowdown for perl -d
Message-ID: <20030124184419.F11179@fdgroup.com>

p4raw-id: //depot/perl@18589

mg.c
op.h
pp_ctl.c

diff --git a/mg.c b/mg.c
index 0e34080..fae5cda 100644 (file)
--- 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 (file)
--- a/op.h
+++ b/op.h
@@ -97,6 +97,8 @@ Deprecated.  Use C<GIMME_V> 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
index 1a3fd1d..2e302ed 100644 (file)
--- 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;