pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:3726:    */   PIKECLASS LiveBacktraceFrame   {    /*! @decl @Annotations.Implements(BacktraceFrame)    */    IMPLEMENTS backtrace_frame;       /* The live frame to inspect. */    CVAR struct pike_frame *fp;    + #ifdef PIKE_THREADS    /* The thread that owns the frame.    *    * NB: This is required for PROFILING, but may be useful    * in other cases too.    */    PIKEVAR object thread_obj flags ID_PRIVATE;    CVAR struct thread_state *thread_state; -  + #endif       /* fp->pc when low_get_line() was last called. */    CVAR PIKE_OPCODE_T *pc;       /* Cached result of low_get_line(). lineno == 0 indicates    * that the values are stale.    */    CVAR struct pike_string *filename;    CVAR INT_TYPE lineno;    CVAR struct local_variable_info locals;
pike.git/src/builtin.cmod:4034:    push_undefined();    } else {    push_int(fp->num_locals);    }    }      #ifdef PROFILING    PIKEFUN int `total_time()    {    struct pike_frame *fp = THIS->fp; -  if (!fp || !THIS->thread_state) { +  if (!fp) {    push_undefined(); -  } else { + #ifdef PIKE_THREADS +  } else if (THIS->thread_state) {    push_int64(get_cpu_time() -    (THIS->thread_state->state.unlocked_time + fp->start_time)); -  + #endif +  } else { +  push_int64(get_cpu_time() - +  (Pike_interpreter.unlocked_time + fp->start_time));    }    }   #endif       PIKEFUN mixed get_local(int(0..) l)    {    struct pike_frame *fp = THIS->fp;    if (!fp || (l >= fp->num_locals)) {    Pike_error("No such local: #%d\n", l);    }
pike.git/src/builtin.cmod:4230:    struct LiveBacktraceFrame_struct *bf;       o = fast_clone_object(LiveBacktraceFrame_program);       bf = OBJ2_LIVEBACKTRACEFRAME(o);       SET_SVAL(res->item[size], PIKE_T_OBJECT, 0, object, o);       add_ref(bf->fp = f);    + #ifdef PIKE_THREADS    if ((bf->thread_state = i->thread_state)) {    add_ref(bf->thread_obj = i->thread_state->thread_obj);    } -  + #endif    -  /* FIXME: Keep track of the corresponding thread? */ -  +     continue;    }       o = fast_clone_object(backtrace_frame_program);       SET_SVAL(res->item[size], PIKE_T_OBJECT, 0, object, o);       bf = OBJ2_BACKTRACE_FRAME(o);      #ifdef PROFILING