* know. Run now! Hope is in speed!" --Gandalf
*/
-dEXT char **watchaddr = 0;
-dEXT char *watchok;
-
-#ifndef DEBUGGING
+#ifdef PERL_OBJECT
+#define CALLOP this->*op
+#else
+#define CALLOP *op
+#endif
int
-runops() {
+runops_standard(void) {
dTHR;
- SAVEI32(runlevel);
- runlevel++;
- while ( op = (*op->op_ppaddr)(ARGS) ) ;
+ while ( op = (CALLOP->op_ppaddr)(ARGS) ) ;
TAINT_NOT;
return 0;
}
-#else
+#ifdef DEBUGGING
+dEXT char **watchaddr = 0;
+dEXT char *watchok;
+
+#ifndef PERL_OBJECT
static void debprof _((OP*o));
+#endif
int
-runops() {
+runops_debug(void) {
dTHR;
if (!op) {
warn("NULL OP IN RUN");
return 0;
}
- SAVEI32(runlevel);
- runlevel++;
-
do {
if (debug) {
if (watchaddr != 0 && *watchaddr != watchok)
DEBUG_s(debstack());
DEBUG_t(debop(op));
DEBUG_P(debprof(op));
-#ifdef USE_THREADS
- DEBUG_L(YIELD()); /* shake up scheduling a bit */
-#endif /* USE_THREADS */
}
- } while ( op = (*op->op_ppaddr)(ARGS) );
+ } while ( op = (CALLOP->op_ppaddr)(ARGS) );
TAINT_NOT;
return 0;
}
I32
-debop(o)
-OP *o;
+debop(OP *o)
{
SV *sv;
deb("%s", op_name[o->op_type]);
}
void
-watch(addr)
-char **addr;
+watch(char **addr)
{
watchaddr = addr;
watchok = *addr;
(long)watchaddr, (long)watchok);
}
-static void
-debprof(o)
-OP* o;
+STATIC void
+debprof(OP *o)
{
if (!profiledata)
New(000, profiledata, MAXO, U32);
}
void
-debprofdump()
+debprofdump(void)
{
unsigned i;
if (!profiledata)
}
}
-#endif
+#endif /* DEBUGGING */