pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.366 2002/10/15 14:57:38 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.367 2003/01/29 15:55:25 mast 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:3811:       for(e=0;e<a->size;e++)    index_no_free(ITEM(a)+e, val, ITEM(tmp)+e);       Pike_sp--;    dmalloc_touch_svalue(Pike_sp);    pop_n_elems(args);    push_array(a);   }    -  - #ifdef PIKE_DEBUG +    /*! @decl void _verify_internals()    *!    *! Perform sanity checks.    *!    *! This function goes through most of the internal Pike structures and    *! generates a fatal error if one of them is found to be out of order.    *! It is only used for debugging.    *!    *! @note -  *! This function is only available if the Pike runtime has been compiled -  *! with RTL debug. +  *! This function does a much more thorough check if the Pike runtime +  *! has been compiled with RTL debug.    */   PMOD_EXPORT void f__verify_internals(INT32 args)   {    INT32 tmp=d_flag;    CHECK_SECURITY_OR_ERROR(SECURITY_BIT_SECURITY,    ("_verify_internals: permission denied.\n"));    d_flag=0x7fffffff; -  do_debug(); -  d_flag=tmp; + #ifdef PIKE_DEBUG +  do_debug(); /* Calls do_gc() since d_flag > 3. */ + #else    do_gc(); -  + #endif +  d_flag=tmp;    pop_n_elems(args);   }    -  + #ifdef PIKE_DEBUG +    /*! @decl int _debug(int(0..) level)    *!    *! Set the run-time debug level.    *!    *! @returns    *! The old debug level will be returned.    *!    *! @note    *! This function is only available if the Pike runtime has been compiled    *! with RTL debug.
pike.git/src/builtin_functions.c:3937: Inside #if defined(PIKE_DEBUG) and #if defined(YYDEBUG)
   INT_TYPE yyd;    CHECK_SECURITY_OR_ERROR(SECURITY_BIT_SECURITY,    ("_compiler_trace: permission denied.\n"));    get_all_args("_compiler_trace", args, "%i", &yyd);    pop_n_elems(args);    push_int(yydebug);    yydebug = yyd;   }      #endif /* YYDEBUG */ - #endif + #endif /* PIKE_DEBUG */      #if defined(HAVE_LOCALTIME) || defined(HAVE_GMTIME)   static void encode_struct_tm(struct tm *tm)   {    push_string(make_shared_string("sec"));    push_int(tm->tm_sec);    push_string(make_shared_string("min"));    push_int(tm->tm_min);    push_string(make_shared_string("hour"));    push_int(tm->tm_hour);
pike.git/src/builtin_functions.c:7726:   #endif      #ifdef HAVE_MKTIME      /* function(int,int,int,int,int,int,int,void|int:int)|function(object|mapping:int) */    ADD_EFUN("mktime",f_mktime,    tOr(tFunc(tInt tInt tInt tInt tInt tInt tInt tOr(tVoid,tInt),tInt),    tFunc(tOr(tObj,tMapping),tInt)),OPT_TRY_OPTIMIZE);   #endif    - #ifdef PIKE_DEBUG -  +    /* function(:void) */    ADD_EFUN("_verify_internals",f__verify_internals,    tFunc(tNone,tVoid),OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND);    -  + #ifdef PIKE_DEBUG +    /* function(int:int) */    ADD_EFUN("_debug",f__debug,    tFunc(tInt,tInt),OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND);      /* function(int:int) */    ADD_EFUN("_optimizer_debug",f__optimizer_debug,    tFunc(tInt,tInt),OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND);      /* function(int:int) */    ADD_EFUN("_assembler_debug",f__assembler_debug,