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.445 2008/06/28 15:32:29 per Exp $ + // $Id: master.pike.in,v 1.446 2008/06/28 17:14:27 nilsson 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:100:   #define Stat Files.Stat   #define capitalize(X) (upper_case((X)[..0])+(X)[1..])   #define trim_all_whites(X) (Builtin.string_trim_all_whites (X))      private function write = Files()->_stdout->write;   private function werror = Files()->_stderr->write;      #ifdef RESOLV_DEBUG      #if constant (thread_local) - static object resolv_msg_depth = thread_local(); + protected object resolv_msg_depth = thread_local();   // NOTE: May be used before __INIT has completed.   #define GET_RESOLV_MSG_DEPTH (resolv_msg_depth && resolv_msg_depth->get())   #define INC_RESOLV_MSG_DEPTH() (resolv_msg_depth && resolv_msg_depth->set (resolv_msg_depth->get() + 1))   #define DEC_RESOLV_MSG_DEPTH() (resolv_msg_depth && resolv_msg_depth->set (resolv_msg_depth->get() - 1))   #else - static int resolv_msg_depth; + protected int resolv_msg_depth;   #define GET_RESOLV_MSG_DEPTH resolv_msg_depth   #define INC_RESOLV_MSG_DEPTH() (++resolv_msg_depth)   #define DEC_RESOLV_MSG_DEPTH() (--resolv_msg_depth)   #endif      void resolv_debug (string fmt, mixed... args)   {    string pad = " " * GET_RESOLV_MSG_DEPTH;    if (sizeof (args)) fmt = sprintf (fmt, @args);    if (fmt[-1] == '\n')
pike.git/lib/master.pike.in:140:   // Some API compatibility stuff.      //! Pike 0.6 master compatibility interface.   //!   //! Most of the interface is implemented via mixin.   //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject] - static class Pike_0_6_master + protected class Pike_0_6_master   {    int is_absolute_path(string p);    array(string) explode_path(string p);    string dirname(string x);    string basename(string x);    string describe_backtrace(array(mixed) trace);    object low_cast_to_object(string oname, string current_file);    extern array(string) pike_include_path;    extern array(string) pike_module_path;    extern array(string) pike_program_path;
pike.git/lib/master.pike.in:211:    //! possible.       string|mapping(string:string) getenv(string|void s);    void putenv(string|void varname, string|void value);       // compat_environment is the mapping returned by `environment    // (if any).    // compat_environment_copy is used to keep track of any changes    // performed destructively on the compat_environment mapping.    // Both should be zero if not in use. -  static mapping(string:array(string)) compat_environment; -  static mapping(string:array(string)) compat_environment_copy; +  protected mapping(string:array(string)) compat_environment; +  protected mapping(string:array(string)) compat_environment_copy;      #pragma no_deprecation_warnings    local __deprecated__(mapping(string:array(string))) `environment()    {    if (compat_environment) return compat_environment;    compat_environment_copy = ([]);   #ifdef __NT__    // Can't use the cached environment returned by getenv(), since    // variable names have been lowercased there.    foreach((array(array(string)))Builtin._getenv(), array(string) pair) {
pike.git/lib/master.pike.in:282:    void create();    program handle_inherit(string pname, string current_file);    extern mapping(program:object) objects;    object low_cast_to_object(string oname, string current_file);    object cast_to_object(string oname, string current_file);    class dirnode {};    class joinnode {};    extern mapping(string:mixed) fc;    object findmodule(string fullname);    mixed handle_import(string what, string|void current_file); -  local static object Pike_0_6_compat_handler; +  local protected object Pike_0_6_compat_handler;    local mixed resolv(string identifier, string|void current_file)    {    if (!Pike_0_6_compat_handler) {    Pike_0_6_compat_handler = global::get_compilation_handler(0, 6);    }    return Pike_0_6_compat_handler->resolv(identifier, current_file);    }    extern string _pike_file_name;    extern string _master_file_name;    void _main(array(string) orig_argv, array(string) env);
pike.git/lib/master.pike.in:361:   #endif   #ifdef PIKE_AUTORELOAD    extern int autoreload_on;    extern int newest;   #endif    string master_read_file();    string normalize_path(string X);    program cast_to_program(string pname, string current_file,    object|void handler);    void handle_error(array(mixed)|object trace); -  static private constant mkmultiset = mkmultiset; +  protected private constant mkmultiset = mkmultiset;    program handle_inherit(string pname, string current_file, object|void handler);    mixed handle_import(string what, string|void current_file, object|void handler);    mixed resolv_base(string identifier, string|void current_file);       // FIXME: Not in 7.7!    extern mapping resolv_cache; -  local static object Pike_7_0_compat_handler; +  local protected object Pike_7_0_compat_handler;    local mixed resolv(string identifier, string|void current_file)    {    if (!Pike_7_0_compat_handler) {    Pike_7_0_compat_handler = global::get_compilation_handler(7, 0);    }    return Pike_7_0_compat_handler->resolv(identifier, current_file);    }    mixed get_inhibit_compile_errors();    string decode_charset(string data, string charset);    local __deprecated__(int) clipped=0;
pike.git/lib/master.pike.in:565:   }      //! Pike 7.2 master compatibility interface.   //!   //! Most of the interface is implemented via mixin.   //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject] - static class Pike_7_2_master + protected class Pike_7_2_master   {    inherit Pike_7_0_master;   #ifdef PIKE_MODULE_RELOC    string relocate_module(string s);    string unrelocate_module(string s);   #endif    extern int compat_major;    extern int compat_minor;   #ifdef FILE_STAT_CACHE    Stat master_file_stat(string x);   #endif    object low_cast_to_object(string oname, string current_file,    object|void current_handler);    object findmodule(string fullname, object|void handler); -  local static object Pike_7_2_compat_handler; +  local protected object Pike_7_2_compat_handler;    local mixed resolv(string identifier, string|void current_file)    {    if (!Pike_7_2_compat_handler) {    Pike_7_2_compat_handler = global::get_compilation_handler(7, 2);    }    return Pike_7_2_compat_handler->resolv(identifier, current_file);    }    void runtime_warning(string where, string what, mixed ... args); -  static int clipped; -  static int canclip; -  static string stupid_describe(mixed m, int maxlen); -  static string stupid_describe_comma_list(array x, int maxlen); +  protected int clipped; +  protected int canclip; +  protected string stupid_describe(mixed m, int maxlen); +  protected string stupid_describe_comma_list(array x, int maxlen);    class Describer {};    string describe_function(function f);    class CompatResolver {};    class Version {};    extern object currentversion;    extern mapping(object:object) compat_handler_cache;    object get_compilation_handler(int major, int minor);    local string _sprintf(int|void t)    {    return UNDEFINED;
pike.git/lib/master.pike.in:619:   }      //! Pike 7.4 master compatibility interface.   //!   //! Most of the interface is implemented via mixin.   //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject] - static class Pike_7_4_master + protected class Pike_7_4_master   {    inherit Pike_7_2_master; -  local static object Pike_7_4_compat_handler; +  local protected object Pike_7_4_compat_handler;    void error(string f, mixed ... args);    local mixed resolv(string identifier, string|void current_file)    {    if (!Pike_7_4_compat_handler) {    Pike_7_4_compat_handler = global::get_compilation_handler(7, 4);    }    return Pike_7_4_compat_handler->resolv(identifier, current_file);    }    object get_compat_master(int major, int minor)    {
pike.git/lib/master.pike.in:646:   }      //! Pike 7.6 master compatibility interface.   //!   //! Most of the interface is implemented via mixin.   //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject] - static class Pike_7_6_master + protected class Pike_7_6_master   {    inherit Pike_7_4_master; -  local static object Pike_7_6_compat_handler; +  local protected object Pike_7_6_compat_handler;    local mixed resolv(string identifier, string|void current_file)    {    if (!Pike_7_6_compat_handler) {    Pike_7_6_compat_handler = global::get_compilation_handler(7, 6);    }    return Pike_7_6_compat_handler->resolv(identifier, current_file);    }    array get_backtrace (object|array err);    object get_compat_master(int major, int minor)    {
pike.git/lib/master.pike.in:672:    }   }      //! Namespaces for compat masters.   //!   //! This inherit is used to provide compatibility namespaces   //! for @[get_compat_master()].   //!   //! @seealso   //! @[get_compat_master()] - static inherit Pike_7_6_master; + protected inherit Pike_7_6_master;      class CompatAllConstants (mapping(string:mixed) compat_overrides)   // Wrapper for the mapping returned by all_constants in compat mode.   { -  static mixed `[] (string sym) +  protected mixed `[] (string sym)    {    mixed val = compat_overrides[sym];    if (zero_type (val)) val = predef::all_constants()[sym];    return val;    } -  static mixed `-> (string sym) +  protected mixed `-> (string sym)    {return `[] (sym);}    -  static mixed `[]= (string sym, mixed val) +  protected mixed `[]= (string sym, mixed val)    {return predef::all_constants()[sym]= val;} -  static mixed `->= (string sym, mixed val) +  protected mixed `->= (string sym, mixed val)    {return `[]= (sym, val);}    -  static array(string) _indices() +  protected array(string) _indices()    {return indices (predef::all_constants() | compat_overrides);} -  static array(mixed) _values() +  protected array(mixed) _values()    {return values (predef::all_constants() | compat_overrides);}    -  static mapping `+ (mapping other) +  protected mapping `+ (mapping other)    {return (predef::all_constants() | compat_overrides) + other;} -  static mapping ``+ (mapping other) +  protected mapping ``+ (mapping other)    {return other + (predef::all_constants() | compat_overrides);} -  static mapping `| (mapping other) +  protected mapping `| (mapping other)    {return (predef::all_constants() | compat_overrides) | other;} -  static mapping ``| (mapping other) +  protected mapping ``| (mapping other)    {return other | (predef::all_constants() | compat_overrides);}   }      //! @appears error   //! Throws an error. A more readable version of the code   //! @expr{throw( ({ sprintf(f, @@args), backtrace() }) )@}.   void error(string f, mixed ... args) {    if (sizeof(args)) f = sprintf(f, @args);    throw( ({ f, backtrace()[..<1] }) );   }
pike.git/lib/master.pike.in:953:   //!   string master_read_file(string file)   {    object o=Files()->Fd();    if( ([function(string, string : int)]o->open)(fakeroot(file),"r") )    return ([function(void : string)]o->read)();    return 0;   }      #ifdef GETCWD_CACHE - static string current_path; + protected string current_path;   int cd(string s)   {    current_path=0;    return predef::cd(s);   }      string getcwd()   {    return current_path || (current_path=predef::getcwd());   }
pike.git/lib/master.pike.in:1023:   #endif    if(d && !d[file]) return 0;       return predef::file_stat(x);   }   #else   #define master_file_stat file_stat   #endif // FILE_STAT_CACHE       - static mapping(string:string) environment; + protected mapping(string:string) environment;      #ifdef __NT__ - static void set_lc_env (mapping(string:string) env) + protected void set_lc_env (mapping(string:string) env)   {    environment = ([]);    foreach (env; string var; string val)    environment[lower_case (var)] = val;   }   #endif      //! @decl string getenv (string varname, void|int force_update)   //! @decl mapping(string:string) getenv (void|int force_update)   //!
pike.git/lib/master.pike.in:1249:      // Note: It's assumed that the mappings above never decrease in size   // unless the reverse mappings above also are updated. no_value should   // otherwise be used for entries that should be considered removed.      constant no_value = (<>);   constant NoValue = typeof (no_value);      // The reverse mapping for objects isn't only for speed; search()   // doesn't work reliably there since it calls `==. - static mapping(program:string) rev_programs = ([]); - static mapping(object:program) rev_objects = ([]); - static mapping(mixed:string) rev_fc = ([]); + protected mapping(program:string) rev_programs = ([]); + protected mapping(object:program) rev_objects = ([]); + protected mapping(mixed:string) rev_fc = ([]);      string programs_reverse_lookup (program prog)   //! Returns the path for @[prog] in @[programs], if it got any.   {    // When running with trace, this function can get called    // before __INIT has completed.    if (!rev_programs) return UNDEFINED;    if (sizeof (rev_programs) < sizeof (programs)) {    foreach (programs; string path; program|NoValue prog)    if (prog == no_value)
pike.git/lib/master.pike.in:1312:    fname = fakeroot (fname);    // FIXME: Not sure if this works correctly with the fakeroot and    // module relocation stuff.    foreach (pike_module_path, string path)    if (has_prefix (fname, path))    return map (pike_module_path, `+, "/", fname[sizeof (path)..], ".o");   #endif    return ({ fname + ".o" });   }    - static class CompileCallbackError + protected class CompileCallbackError   {    inherit _static_modules.Builtin.GenericError;    constant is_generic_error = 1;    constant is_compile_callback_error = 1;    constant is_cpp_or_compilation_error = 1;   }    - static void compile_cb_error (string msg, mixed ... args) + protected void compile_cb_error (string msg, mixed ... args)   // Use this to throw errors that should be converted to plain compile   // error messages, without backtraces being reported by   // compile_exception.   {    if (sizeof (args)) msg = sprintf (msg, @args);    throw (CompileCallbackError (msg, backtrace()[..<1]));   }    - static void compile_cb_rethrow (object|array err) + protected void compile_cb_rethrow (object|array err)   // Use this to rethrow errors that should be converted to plain   // compile error messages, without backtraces being reported by   // compile_exception.   {    array bt;    if (array|object e = catch (bt = get_backtrace (err)))    handle_error (e);    throw (CompileCallbackError (describe_error (err), bt));   }    - static void call_compile_warning (object handler, string file, + protected void call_compile_warning (object handler, string file,    string msg, mixed ... args)   {    if (sizeof (args)) msg = sprintf (msg, @args);    msg = trim_all_whites (msg);    if (handler && handler->compile_warning)    handler->compile_warning (file, 0, msg);    else    compile_warning (file, 0, msg);   }   
pike.git/lib/master.pike.in:1362:   #define THREADED   _static_modules.Builtin.mutex compilation_mutex = Builtin.mutex();   #endif      #ifdef __NT__   #define FIX_CASE(X) lower_case(X)   #else   #define FIX_CASE(X) (X)   #endif /* __NT__ */    - static string base_from_filename(string fname) + protected string base_from_filename(string fname)   {    string low_name = FIX_CASE(fname);    if (has_prefix(low_name, ".#")) return 0;    if (has_suffix(low_name, ".pike") ||    has_suffix(low_name, ".pmod")) {    return fname[..<5];    }    if (has_suffix(low_name, ".so")) {    return fname[..<3];    }    return 0;   }    - static int prio_from_filename(string fname) + protected int prio_from_filename(string fname)   {    fname = FIX_CASE(fname);    if (has_suffix(fname, ".pmod")) return 3;    if (has_suffix(fname, ".so")) return 2;    if (has_suffix(fname, ".pike")) return 1;       // FIXME: Warn here?    return 0;   }   
pike.git/lib/master.pike.in:1493:    if (documentation[prog])    {    if (child)    return documentation[prog]->findObject(child)||documentation[prog]->findChild(child);    else    return documentation[prog];    }   }       - static program low_findprog(string pname, + protected program low_findprog(string pname,    string ext,    object|void handler,    void|int mkobj)   {    program ret;    Stat s;    string fname=pname+ext;       resolv_debug("low_findprog(%O, %O, %O, %O)\n",    pname, ext, handler, mkobj);
pike.git/lib/master.pike.in:1720:    }       foreach (fc; string name; mixed mod)    if (objectp(mod) && object_program(mod) == p)    if (m_delete (rev_fc, mod))    m_delete (fc, name);    else    fc[name] = no_value;   }    - static program findprog(string pname, + protected program findprog(string pname,    string ext,    object|void handler,    void|int mkobj)   {    switch(ext)    {    case ".pike":    case ".so":    return low_findprog(pname,ext,handler, mkobj);   
pike.git/lib/master.pike.in:1907:   //! Writes a string on stdout. Works just like @[Stdio.File.write]   //! on @[Stdio.stdout].      //! @decl int werror(string fmt, mixed ... args)   //! @appears werror   //! Writes a string on stderr. Works just like @[Stdio.File.write]   //! on @[Stdio.stderr].      /* Note that create is called before add_precompiled_program    */ - static void create() + protected void create()   {    foreach(master_efuns, string e)    if (!zero_type(this[e]))    add_constant(e, this[e]);    else    error("Function %O is missing from master.pike.\n", e);       add_constant("__dirnode", dirnode);    add_constant("__joinnode", joinnode);   
pike.git/lib/master.pike.in:2016:    DEC_RESOLV_MSG_DEPTH();    resolv_debug ("cast_to_object(%O, %O) => %O\n", oname, current_file, o);    if (objectp (o)) return o;    error("Cast %O to object failed%s.\n",    oname,    (current_file && current_file!="-") ? sprintf(" in %O",current_file) : "");   }      // Marker used for negative caching in module caches.   // FIXME: Won't this cause problems when inheriting "/master"? - static class ZERO_TYPE {}; + protected class ZERO_TYPE {};    - static object Unicode; + protected object Unicode;      //! Module node representing a single directory.   //!   //! @seealso   //! @[joinnode]   class dirnode   {    string dirname;    object|void compilation_handler;    constant is_resolv_dirnode = 1;
pike.git/lib/master.pike.in:2041:    mixed module;    mapping(string:mixed) cache=([]);    mapping(string:array(string)) file_paths = ([]);      #ifdef __NT__   #define FIX_CASE(X) lower_case(X)   #else   #define FIX_CASE(X) (X)   #endif /* __NT__ */    -  static string base_from_filename(string fname) +  protected string base_from_filename(string fname)    {    string low_name = FIX_CASE(fname);    catch {    // FIXME: Warn on failure?    low_name = utf8_to_string(low_name);    if (Builtin.string_width(low_name) > 8) {    // We might need to normalize the string (cf MacOS X).       // Load the Unicode module if it hasn't already been loaded.    if (!Unicode) {
pike.git/lib/master.pike.in:2068:    if (has_suffix(low_name, ".pike") ||    has_suffix(low_name, ".pmod")) {    return fname[..<5];    }    if (has_suffix(low_name, ".so")) {    return fname[..<3];    }    return 0;    }    -  static int prio_from_filename(string fname) +  protected int prio_from_filename(string fname)    {    fname = FIX_CASE(fname);    if (has_suffix(fname, ".pmod")) return 3;    if (has_suffix(fname, ".so")) return 2;    if (has_suffix(fname, ".pike")) return 1;       // FIXME: Warn here?    return 0;    }    -  static void create(string d, object|void h) +  protected void create(string d, object|void h)    {    resolv_debug ("dirnode(%O,%O) created\n",d,h);    dirname=d;    compilation_handler=h;    fc[dirname]=this;    array(string) files = sort(master_get_dir(d)||({}));    if (!sizeof(d)) return;    array(string) bases = map(files, base_from_filename);    files = filter(files, bases);    bases = filter(bases, bases);
pike.git/lib/master.pike.in:2166:    mixed `[](string index)    {    resolv_debug ("dirnode(%O)->module_checker()[%O] => %O\n",    dirname, index, module && module[index]);    return module && module[index];    }    array(string) _indices() { if(module) return indices(module); }    array _values() { if(module) return values(module); }    }    -  static mixed low_ind(string index, int(0..1)|void set_module) +  protected mixed low_ind(string index, int(0..1)|void set_module)    {    array(string) paths;       if (!(paths = file_paths[index])) {    DEC_RESOLV_MSG_DEPTH();    resolv_debug("dirnode(%O)->ind(%O) => no file match\n",    dirname, index);    return UNDEFINED;    }   
pike.git/lib/master.pike.in:2254:    }    resolv_debug("dirnode(%O)->ind(%O) => failure for file %O\n",    dirname, index, fname);    }       resolv_debug("dirnode(%O)->ind(%O) => UNDEFINED\n",    dirname, index);    return UNDEFINED;    }    -  static mixed ind(string index) +  protected mixed ind(string index)    {    resolv_debug ("dirnode(%O)->ind(%O)\n", dirname, index);    INC_RESOLV_MSG_DEPTH();       if (_cache_full) {    DEC_RESOLV_MSG_DEPTH();    resolv_debug("dirnode(%O)->ind(%O) => cache_full %O\n",    dirname, index, cache[index]);    return cache[index];    }
pike.git/lib/master.pike.in:2335:    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; +  protected 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;    }
pike.git/lib/master.pike.in:2365:    dirname, module, indices(module));    map(indices(module), safe_index);    }       map(indices(file_paths), safe_index);    _cache_full = (object_program(module) != __null_program);    resolv_debug ("dirnode(%O) => Cache %s.\n", dirname,    _cache_full?"full":"partially filled");    }    -  static array(string) _indices() +  protected 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));    }    -  static array(mixed) _values() +  protected array(mixed) _values()    {    fill_cache();    return values(cache) - ({ZERO_TYPE});    }       void delete_value (mixed val)    {    if (string name = search (cache, val)) {    m_delete (cache, name);    _cache_full = 0;    }    }    -  static int(0..) _sizeof() { +  protected int(0..) _sizeof() {    return sizeof(_values());    }    -  static string _sprintf(int as) +  protected string _sprintf(int as)    {    return as=='O' && sprintf("master()->dirnode(%O:%O)",    dirname, module && module);    }   }      //! Module node holding possibly multiple directories,   //! and optionally falling back to another level.   //!   //! @seealso
pike.git/lib/master.pike.in:2422:       // NOTE: Uses the empty mapping as the default fallback    // for simplified code.    joinnode|mapping(mixed:int(0..0)) fallback_module = ([]);       string _sprintf(int as)    {    return as=='O' && sprintf("master()->joinnode(%O)",joined_modules);    }    -  static void create(array(object|mapping) _joined_modules, +  protected void create(array(object|mapping) _joined_modules,    object|void _compilation_handler,    joinnode|void _fallback_module)    {    joined_modules = _joined_modules;    compilation_handler = _compilation_handler;    fallback_module = _fallback_module || ([]);    resolv_debug ("joinnode(%O) created\n", joined_modules);    }       void add_path(string path)
pike.git/lib/master.pike.in:2456:    joined_modules = filter(joined_modules,    lambda(dirnode node) {    return !objectp(node) ||    !node->is_resolv_dirnode ||    (node->dirname != path);    });    // FIXME: What about the cache?    // FIXME: Propagate!    }    -  static mixed ind(string index) +  protected mixed ind(string index)    {    resolv_debug ("joinnode(%O)->ind(%O)\n", joined_modules, index);    INC_RESOLV_MSG_DEPTH();       array(mixed) res = ({});    foreach(joined_modules, object|mapping o)    {    mixed ret;    if (!zero_type(ret = o[index]))    {
pike.git/lib/master.pike.in:2517:    if(ret == predef::__placeholder_object) return ret;       if (zero_type(ret)) {    cache[index] = ZERO_TYPE;    } else {    cache[index] = ret;    }    return ret;    }    -  static int _cache_full; +  protected int _cache_full;       void fill_cache()    {   #if 0    werror(describe_backtrace(({ "Filling cache in joinnode\n",    backtrace() })));   #endif    if (_cache_full) {    return;    }
pike.git/lib/master.pike.in:2777:    //! If we fail to resolv, try the fallback.    //!    //! Typical configuration:    //! @pre{0.6->7.0->7.2-> ... ->master@}    CompatResolver fallback_resolver;       //! The CompatResolver is initialized with a value that can be    //! casted into a "%d.%d" string, e.g. a version object.    //!    //! It can also optionally be initialized with a fallback resolver. -  static void create(mixed version, CompatResolver|void fallback_resolver) +  protected void create(mixed version, CompatResolver|void fallback_resolver)    {    resolv_debug("CompatResolver(%O, %O)\n", version, fallback_resolver);    ver=(string)version;   #if 0    if (version) {    root_module->symbol = ver + "::";    }   #endif    if (CompatResolver::fallback_resolver = fallback_resolver) {    root_module->fallback_module = fallback_resolver->root_module;
pike.git/lib/master.pike.in:2900:    }       //! Returns a mapping with the current predefines.    mapping get_predefines()    {    return predefines;    }       //! Instantiate static modules in the same way that dynamic modules    //! are instantiated. -  static mapping(string:mixed) instantiate_static_modules(object|mapping static_modules) +  protected mapping(string:mixed) instantiate_static_modules(object|mapping static_modules)    {    mapping(string:mixed) res = ([]), joins = ([]);    foreach(indices(static_modules), string name) {    mixed val = static_modules[name];    if (!val->_module_value)    val = val();    if(mixed tmp=val->_module_value) val=tmp;    if(!has_value(name, '.'))    res[name] = val;    else {
pike.git/lib/master.pike.in:3171:   private int(0..1) _async=0;      //! Returns 1 if we´re in async-mode, e.g. if the main method has   //! returned a negative number.   int(0..1) asyncp() {    return _async;   }      #if constant(thread_create)   // this must be done in __init if someone inherits the master - static object _backend_thread=this_thread(); + protected object _backend_thread=this_thread();      //! The backend_thread() function is useful to determine if you are   //! the backend thread - important when doing async/sync protocols.   //! This method is only available if thread_create is present.   object backend_thread()   {    return _backend_thread;   }   #endif         mapping(string:string) initial_predefines = ([]);    - static mixed main_resolv(string sym, CompatResolver|void resolver) { + protected mixed main_resolv(string sym, CompatResolver|void resolver) {    mixed v = (resolver||this)->resolv(sym);    if(!v)    error("Could not resolve %s. "    "(Perhaps the installed pike tree has been moved.)\n", sym);    return v;   };      //! This function is called when all the driver is done with all setup   //! of modules, efuns, tables etc. etc. and is ready to start executing   //! _real_ programs. It receives the arguments not meant for the driver.
pike.git/lib/master.pike.in:3699:   {    inhibit_compile_errors=f;   }      mixed get_inhibit_compile_errors()   {    return inhibit_compile_errors;   }   #endif /* constant(thread_local) */    - static private function(string:string) _trim_file_name_cb=0; + protected private function(string:string) _trim_file_name_cb=0;   string trim_file_name(string s)   {   #ifdef PIKE_MODULE_RELOC    s = relocate_module(s);   #endif    if(getenv("LONG_PIKE_ERRORS")) return s;    if(getenv("SHORT_PIKE_ERRORS")) return BASENAME(s);       if (_trim_file_name_cb) return _trim_file_name_cb(s);   
pike.git/lib/master.pike.in:3824:    sprintf("%O", args[0][*]));   #endif    break;       default:    werror ("%s warning: %s %O\n", capitalize (where), what, args);    }   }       - static object Charset; + protected object Charset;      //! This function is called by cpp() when it wants to do   //! character code conversion.   string decode_charset(string data, string charset)   {    if (!Charset) {    object mod = [object]resolv("Locale");       Charset = [object](mod && mod["Charset"]);    if (!Charset)
pike.git/lib/master.pike.in:4724:   //! A string Look up this string in the result.   //! 'm' Get module object in dirnode.   //! 'p' Do object_program(result).   //!   //! All lowercase letters and the symbols ':', '/' and '.' are   //! reserved for internal use in both cases where characters are used   //! above.   {    mixed encoded;    -  static mapping(mixed:string) rev_constants = ([]); -  static mapping(mixed:string) rev_static_modules = ([]); +  protected mapping(mixed:string) rev_constants = ([]); +  protected mapping(mixed:string) rev_static_modules = ([]);    -  static array find_index (object|program parent, mixed child, +  protected array find_index (object|program parent, mixed child,    array(object) module_object,    int|void try)    {    array id;       find_id: {    array inds = indices (parent), vals = values (parent);    int i = search (vals, child);    if (i >= 0 && parent[inds[i]] == child) {    id = ({inds[i]});
pike.git/lib/master.pike.in:4778:    if (try) {    ENC_MSG("Got nonstring index %O for %O in %O.\n", id[0], child, parent);    return UNDEFINED;    }    error ("Got nonstring index %O for %O in %O.\n", id[0], child, parent);    }       return id;    }    -  static string|array compare_resolved (string name, mixed what, +  protected string|array compare_resolved (string name, mixed what,    mixed resolved, array(object) module_object)    {    array append;       compare: {    if (resolved == what) {    ENC_MSG (" compare_resolved: %O is %O\n", what, resolved);    /* No need for anything advanced. resolv() does the job. */    return "r" + name;    }
pike.git/lib/master.pike.in:5078:    mixed encode_object(object x)    {    DEC_MSG ("encode_object (%O)\n", x);    if(!x->_encode) {    error ("Cannot encode object %O without _encode function.\n", x);    // return ({});    }    DEC_RETURN (([function]x->_encode)());    }    -  static void create (void|mixed encoded) +  protected void create (void|mixed encoded)    //! Creates an encoder instance. If @[encoded] is specified, it's    //! encoded instead of being reverse resolved to a name. That's    //! necessary to encode programs.    {    this_program::encoded = encoded;       foreach (all_constants(); string var; mixed val)    rev_constants[val] = "c" + var;       rev_static_modules =
pike.git/lib/master.pike.in:5115:   #endif    }   }      class Decoder (void|string fname, void|int mkobj, void|object handler)   //! @appears Pike.Decoder   //!   //! Codec for use with @[decode_value]. This is the decoder   //! corresponding to @[Encoder]. See that one for more details.   { -  static int unregistered = 1; +  protected int unregistered = 1;       object __register_new_program(program p)    {    DEC_MSG ("__register_new_program (%O)\n", p);    if(unregistered && fname)    {    unregistered = 0;    resolv_debug("register %s\n", fname);    programs[fname]=p;    if (mkobj)    DEC_RETURN (objectp (objects[p]) ? objects[p] : (objects[p]=__null_program()));    }    DEC_RETURN (0);    }    -  static mixed thingof (string|array what) +  protected mixed thingof (string|array what)    {    mixed res;    array sublist;    if (arrayp (what)) sublist = [array]what, what = [array|string]sublist[0];       switch (what[0]) {    case 'c':    if (zero_type (res = all_constants()[what[1..]]))    error ("Cannot find global constant %O.\n", what[1..]);    break;
pike.git/lib/master.pike.in:5301:    return data;    }    ([function(mixed:void)]o->_decode)(data);    return 0;    }   }      // Note: This mapping is not for caching but for coping with recursion   // problems by returning the same codec for the same file. As a cache   // it's really pointless. - static mapping(string:Decoder) codecs = set_weak_flag (([]), 1); + protected mapping(string:Decoder) codecs = set_weak_flag (([]), 1);      Decoder get_codec(string|void fname, int|void mkobj, void|object handler)   {    if (handler)    // Decoders are currently not reused in this case since it's    // tricky to set up a weak multilevel mapping for lookup. This is    // seldom a problem since explicit handlers are fairly rare. If it    // is then the handler can always override this function.    return Decoder (fname, mkobj, handler);    string key = fname + "\0" + mkobj;
pike.git/lib/master.pike.in:5326:   class Codec   //! @appears Pike.Codec   //!   //! @[Encoder] and @[Decoder] rolled into one. This is for mainly   //! compatibility; there's typically no use combining encoding and   //! decoding into the same object.   {    inherit Encoder;    inherit Decoder;    -  static void create (void|mixed encoded) +  protected void create (void|mixed encoded)    //! The optional argument is the thing to encode; it's passed on to    //! @[Encoder].    {    Encoder::create (encoded);    }   }      // The master acts as the default codec.   inherit Codec;   
pike.git/lib/master.pike.in:5348:   //! Contains version information about a Pike version.   class Version   {       //! The major and minor parts of the version.    int major;    int minor;       //! @decl void create(int major, int minor)    //! Set the version in the object. -  static void create(int maj, int min) +  protected void create(int maj, int min)    {    if(maj==-1) maj = __REAL_MAJOR__;    if(min==-1) min = __REAL_MINOR__;    major = maj;    minor = min;    }      #define CMP(X) ((major - ([object]X)->major) || (minor - ([object]X)->minor))       //! Methods define so that version objects