pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.156 2001/06/06 10:04:08 mirar Exp $ +  * $Id: master.pike.in,v 1.157 2001/06/18 18:05:31 grubba Exp $    *    * Master-file for Pike.    *    * Based on master.pike 1.67.    */      // Some configurable parameters useful for debugging      #pike __REAL_VERSION__   #define PIKE_AUTORELOAD
pike.git/lib/master.pike.in:1184:    }       mapping resolv_cache = set_weak_flag( ([]), 1 );    mixed resolv(string identifier, string|void current_file,    object|void current_handler)    {    // FIXME: Support having the cache in the handler?    if( no_resolv[ identifier ] )    return UNDEFINED;    +  if (current_file && !stringp(current_file)) { +  throw(({sprintf("resolv(%O, %O, %O): current_file is not a string!\n", +  identifier, current_file, current_handler), +  backtrace()})); +  } +     mixed ret;    string id=identifier+":"+(current_file ? dirname(current_file) : "-");    if( !zero_type (ret = resolv_cache[id]) )    return ret == ZERO_TYPE ? UNDEFINED : resolv_cache[id];    array(string) tmp=identifier/".";    ret=resolv_base(tmp[0], current_file, current_handler);    foreach(tmp[1..],string index) ret=ret[index];    resolv_cache[id] = zero_type (ret) ? ZERO_TYPE : ret;    return ret;    }
pike.git/lib/master.pike.in:1798:       void identify_parts (mixed stuff)    {    // Use an array as stack here instead of recursing directly; we    // might be pressed for stack space if the backtrace being    // described is a stack overflow.    array identify_stack = ({stuff});    while (sizeof (identify_stack)) {    stuff = identify_stack[-1];    identify_stack = identify_stack[..sizeof (identify_stack) - 2]; -  if (arrayp (stuff)) { +  if (objectp (stuff) || functionp (stuff) || programp (stuff)) +  ident[stuff]++; +  else if (arrayp (stuff)) {    if (!ident[stuff]++)    identify_stack += stuff;    }    else if (multisetp (stuff)) {    if (!ident[stuff]++)    identify_stack += indices (stuff);    }    else if (mappingp (stuff)) {    if (!ident[stuff]++)    identify_stack += indices (stuff) + values (stuff);    } -  else if (objectp (stuff) || functionp (stuff) || programp (stuff)) -  ident[stuff]++; +     }    }       string describe_string (string m, int maxlen)    {    canclip++;    if(sizeof(m) < maxlen)    {    string t = sprintf("%O", m);    if (sizeof(t) < (maxlen + 2)) {