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.431 2008/06/01 14:41:25 grubba Exp $ + // $Id: master.pike.in,v 1.432 2008/06/01 18:00:43 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:136:   #define DEC_RESOLV_MSG_DEPTH() 0   #define resolv_debug(X...) do {} while (0)   #endif // !RESOLV_DEBUG      // 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()] + //! @[get_compat_master()], @[master()], @[predef::MasterObject]   static 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;
pike.git/lib/master.pike.in:182:    void add_module_path(string tmp);    void remove_module_path(string tmp);    void add_program_path(string tmp);    void remove_program_path(string tmp);    mapping(string:program|NoValue) programs;   #if constant(_static_modules.Builtin.mutex)    extern object compilation_mutex;   #endif    program cast_to_program(string pname, string current_file);    void handle_error(array(mixed) trace); +  +  //! Make a new instance of a class. +  //! +  //! @note +  //! This function should not be used. It is here for +  //! compatibility reasons only.    local __deprecated__ object new(mixed prog, mixed ... args)    {    if(stringp(prog))    prog=cast_to_program(prog,backtrace()[-2][0]);    return prog(@args);    } -  +     local constant mkmultiset = predef::mkmultiset;    local __deprecated__(function) clone = new;    constant master_efuns = ({});    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 {};
pike.git/lib/master.pike.in:258:    string describe_backtrace(array(mixed) trace);    class Codec {};       object get_compat_master(int major, int minor);   }      //! Pike 7.0 master compatibility interface.   //!   //! Most of the interface is implemented via mixin.   //! + //! @deprecated predef::MasterObject + //!   //! @seealso - //! @[get_compat_master()], @[master()] + //! @[get_compat_master()], @[master()], @[predef::MasterObject]   class Pike_7_0_master   {    inherit Pike_0_6_master;    constant bt_max_string_len = 1;    constant out_of_date_warning = 1;   #ifdef PIKE_FAKEROOT    extern object o;    string fakeroot(string s);   #endif   #ifdef PIKE_AUTORELOAD
pike.git/lib/master.pike.in:478:    object get_compat_master(int major, int minor)    {    return Pike_0_6_master::this;    }   }      //! Pike 7.2 master compatibility interface.   //!   //! Most of the interface is implemented via mixin.   //! + //! @deprecated predef::MasterObject + //!   //! @seealso - //! @[get_compat_master()], @[master()] + //! @[get_compat_master()], @[master()], @[predef::MasterObject]   static 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
pike.git/lib/master.pike.in:530:    {    if ((major > 0) || (minor > 6)) return Pike_7_0_master::this;    return Pike_7_0_master::get_compat_master(major, minor);    }   }      //! Pike 7.4 master compatibility interface.   //!   //! Most of the interface is implemented via mixin.   //! + //! @deprecated predef::MasterObject + //!   //! @seealso - //! @[get_compat_master()], @[master()] + //! @[get_compat_master()], @[master()], @[predef::MasterObject]   static class Pike_7_4_master   {    inherit Pike_7_2_master;    local static object Pike_7_4_compat_handler;    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);
pike.git/lib/master.pike.in:554:    {    if ((major == 7) && (minor > 0)) return Pike_7_2_master::this;    return Pike_7_2_master::get_compat_master(major, minor);    }   }      //! Pike 7.6 master compatibility interface.   //!   //! Most of the interface is implemented via mixin.   //! + //! @deprecated predef::MasterObject + //!   //! @seealso - //! @[get_compat_master()], @[master()] + //! @[get_compat_master()], @[master()], @[predef::MasterObject]   static class Pike_7_6_master   {    inherit Pike_7_4_master;    local static 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);
pike.git/lib/master.pike.in:2573:    return UNDEFINED;    }   #endif /* PIKE_MODULE_RELOC */    return fc[path] = dirnode(fakeroot(path), handler);   }   #endif /* 0 */         multiset no_resolv = (<>);    - //! + //! Resolver of symbols not located in the program being compiled.   class CompatResolver   { -  //! Actual resolver +  //! Join node of the root modules for this resolver.    joinnode root_module = joinnode(({instantiate_static_modules(predef::_static_modules)}));       //! Lookup from handler module to corresponding root_module.    mapping(object:joinnode) handler_root_modules = ([]);       //! The pike system module path, not including any set by the user.    array(string) system_module_path=({});       //! The complete module search path    array(string) pike_module_path=({});
pike.git/lib/master.pike.in:2600:       //! The complete program search path    array(string) pike_program_path=({});       mapping(string:string) predefines = master()->initial_predefines;    string ver;       //! If we fail to resolv, try the fallback.    //!    //! Typical configuration: -  //! @pre{0.6->7.0->7.2->7.4->master@} +  //! @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)    {    resolv_debug("CompatResolver(%O, %O)\n", version, fallback_resolver);    ver=(string)version;