pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.499 2003/08/03 02:34:46 mast Exp $ + || $Id: builtin_functions.c,v 1.500 2003/08/04 15:39:38 grubba Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.499 2003/08/03 02:34:46 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.500 2003/08/04 15:39:38 grubba Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:1893:    state->new_program->flags |= PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;    return NULL;    }    else {    int i;   #ifdef PIKE_DEBUG    if (CDR (n)->u.sval.type != T_INT || CDR (n)->u.sval.u.integer < 0)    Pike_fatal ("The type check for this_object() failed.\n");   #endif    level = CDR (n)->u.sval.u.integer; -  for (i = MIN (level, compilation_depth); i; i--, state = state->previous) -  state->new_program->flags |= PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT; +  for (i = MINIMUM(level, compilation_depth); i; +  i--, state = state->previous) { +  state->new_program->flags |= +  PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;    }    } -  +  }       /* We can only improve the type when accessing the innermost object:    * Since this_object always follows the object pointers it might not    * access the lexically surrounding objects. Thus the    * PROGRAM_USES_PARENT stuff above is a bit of a long shot, but it's    * better than nothing. */    if (!level) {    free_type(n->type);    type_stack_mark();    /* We are rather sure that we contain ourselves... */
pike.git/src/builtin_functions.c:6130: Inside #if CPU_TIME_IS_THREAD_LOCAL == PIKE_YES
   * returning a negative number. */   #if CPU_TIME_IS_THREAD_LOCAL == PIKE_YES    time -= Pike_interpreter.thread_state->auto_gc_time;   #elif CPU_TIME_IS_THREAD_LOCAL == PIKE_NO    time -= auto_gc_time;   #endif       nsec = args && !UNSAFE_IS_ZERO(Pike_sp-args);       pop_n_elems(args); -  if (nsec) +  if (args)    push_int64(time);    else    push_int64(time/1000);   }      /*! @decl int gethrtime (void|int nsec)    *!    *! Return the real time since some arbitrary event in the past. The    *! time is normally returned in microseconds, but if the optional    *! argument @[nsec] is nonzero it's returned in nanoseconds.