Change 18589 by rgs@rgs-home on 2003/01/26 13:06:49

        OPf_SPECIAL on OP_DBSTATE now indicates a breakpoint.
        
        Subject: Re: [PATCH] Re: change #9754: 5 x slowdown for perl -d
        From: Dave Mitchell <[EMAIL PROTECTED]>
        Date: Fri, 24 Jan 2003 18:44:19 +0000
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/mg.c#249 edit
... //depot/perl/op.h#115 edit
... //depot/perl/pp_ctl.c#337 edit

Differences ...

==== //depot/perl/mg.c#249 (text) ====
Index: perl/mg.c
--- perl/mg.c#248~18530~        Mon Jan 20 17:37:03 2003
+++ perl/mg.c   Sun Jan 26 05:06:49 2003
@@ -1458,8 +1458,13 @@
     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;
 }
 

==== //depot/perl/op.h#115 (text) ====
Index: perl/op.h
--- perl/op.h#114~17953~        Wed Oct  2 05:55:29 2002
+++ perl/op.h   Sun Jan 26 05:06:49 2003
@@ -97,6 +97,8 @@
                                /*  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

==== //depot/perl/pp_ctl.c#337 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#336~18579~    Sat Jan 25 18:50:44 2003
+++ perl/pp_ctl.c       Sun Jan 26 05:06:49 2003
@@ -1583,7 +1583,8 @@
     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;
End of Patch.

Reply via email to