pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   // -*- Pike -*-   //   // Master Control Program for Pike.   //   // 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: master.pike.in,v 1.422 2008/05/20 16:30:15 grubba Exp $ + // $Id: master.pike.in,v 1.423 2008/05/26 17:56:38 grubba Exp $      #pike __REAL_VERSION__   //#pragma strict_types      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif   
pike.git/lib/master.pike.in:957:    else {    resolv_debug("low_findprog %s: returning %O\n", fname, ret);    return programs[fname]=ret;    }    };    DEC_RESOLV_MSG_DEPTH();    resolv_debug ("low_findprog %s: dump decode failed\n", fname);    programs[fname] = no_value;    call_compile_warning (handler, oname,    "Decode failed: " + describe_error(err)); +  // handle_error(err);    } else if (out_of_date_warning) {    call_compile_warning (handler, oname,    "Compiled file is out of date");    }    }    }       resolv_debug ("low_findprog %s: compiling, mkobj: %O\n", fname, mkobj);    INC_RESOLV_MSG_DEPTH();    programs[fname]=ret=__empty_program(0, fname);
pike.git/lib/master.pike.in:1682:    return ret;    }       cache[index] = zero_type(ret) ? ZERO_TYPE : ret;    return ret;    }       mixed safe_index(string index)    {    mixed err; +  resolv_debug ("dirnode(%O): %O...\n", dirname, index);    if (err = catch { return `[](index); }) {    call_compile_warning (compilation_handler,    dirname+"."+fname,    "Compilation failed: " + describe_error(err));    }    return UNDEFINED;    }       static int(0..1) _cache_full;    void fill_cache()    {   #if 0    werror(describe_backtrace(({ sprintf("Filling cache in dirnode %O\n",    dirname),    backtrace() })));   #endif    if (_cache_full) {    return;    }    -  +  resolv_debug ("dirnode(%O) => Filling cache...\n", dirname); +     // NOTE: We rely on side effects in `[]() and safe_index()    // to fill the cache.       // Why shouldn't thrown errors be propagated here? /mast    if (module) { -  +  resolv_debug("dirnode(%O): module: %O, indices:%{%O, %}\n", +  dirname, module, indices(module));    map(indices(module), safe_index);    }       map(indices(file_paths), safe_index); -  _cache_full = 1; +  _cache_full = (object_program(module) != __null_program); +  resolv_debug ("dirnode(%O) => Cache %s.\n", dirname, +  _cache_full?"full":"partially filled");    }       static array(string) _indices()    {    fill_cache();    // Note: Cannot index cache at all here to filter out the    // ZERO_TYPE values since that can change the order in the    // mapping, and _indices() has to return the elements in the same    // order as a nearby _values() call.    return filter (indices (cache), map (values (cache), `!=, ZERO_TYPE));
pike.git/lib/master.pike.in:2423:    identifier, current_file, current_handler, scope);    }    } else {    tmp = identifier/".";    ret = resolv_base(tmp[0], current_file, current_handler);    tmp = tmp[1..];    }    foreach(tmp,string index) {    resolv_debug("indexing %O with %O...\n",    ret, index); -  resolv_debug("indices(Gmp): %O\n", indices(ret)); +  resolv_debug("indices(%O): %O\n", ret, indices(ret));    if (zero_type(ret)) break;    ret = ret[index];    }    DEC_RESOLV_MSG_DEPTH();   #ifdef RESOLV_DEBUG    if (zero_type (ret))    resolv_debug("resolv(%O, %O) => not found\n",identifier, current_file);    else    resolv_debug("resolv(%O, %O) => found %O\n",identifier, current_file, ret);   #endif /* RESOLV_DEBUG */