pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:3017:    if(mappingp(v))    v = joinify(v);    if(res[n])    res[n] = joinnode(({res[n], v}), 0, 0, n);    else    res[n] = v;    }    return res;    }    +  //! Return the default module for the @[CompatResolver].    //! -  +  //! This is the mapping that corresponds to the @[predef::] +  //! name space for the compatibility level, and is the +  //! value returned by @[all_constants()] for the same.    mapping get_default_module()    {    resolv_debug ("%O->get_default_module()\n", this);       /* This is an ugly kluge to avoid an infinite recursion. The    * infinite recursion occurs because this function is called for    * every file when the compat_major/minor is set. This kluge    * could cause problems with threads if the compiler was    * threaded. -Hubbe    */
pike.git/lib/master.pike.in:3084:    lambda(mixed x) {    return objectp(x) && x->is_resolv_dirnode;    }) }),    current_handler,    root_module->fallback_module,    "predef::");       return node;    }    -  //! +  //! Look up @[identifier] in the root module.    mixed resolv_base(string identifier, string|void current_file,    object|void current_handler)    {    // werror("Resolv_base(%O)\n",identifier);    return get_root_module(current_handler)[identifier];    }       //! Same as @[resolv], but throws an error instead of returning    //! @[UNDEFINED] if the resolv failed.    mixed resolv_or_error(string identifier, string|void current_file,    void|object current_handler)    {    mixed res = resolv(identifier, current_file, current_handler);    if(undefinedp(res)) error("Could not resolve %s.\n", identifier);    return res;    }    -  +  //! Resolve the @[identifier] expression.    //! -  +  //! @returns +  //! Returns the value of the @[identifier] if it exists, +  //! and @[UNDEFINED] otherwise.    mixed resolv(string identifier, string|void current_file,    object|void current_handler)    {    resolv_debug("resolv(%O, %O)\n",identifier, current_file);    INC_RESOLV_MSG_DEPTH();       // FIXME: Support having the cache in the handler?    if( no_resolv[ identifier ] ) {    DEC_RESOLV_MSG_DEPTH();    resolv_debug("resolv(%O, %O) => excluded\n",identifier, current_file);