pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1357:   {    return (all_constants()["describe_backtrace"]||describe_backtrace)    (trace, linewidth);   }      protected string call_describe_error(mixed /* object|array */ err)   {    return (all_constants()["describe_error"]||describe_error)(err);   }    + protected object lock_compiler() + { +  // Compat with older Pike 8.0 binaries. +  if (DefaultCompilerEnvironment->lock) { +  return DefaultCompilerEnvironment->lock(); +  } +  return UNDEFINED; + } +    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",
pike.git/lib/master.pike.in:1410:    AUTORELOAD_BEGIN();      #ifdef PIKE_AUTORELOAD    if (load_time[fname] >= s->mtime)    if (!undefinedp (ret=programs[fname]) && ret != no_value) {    resolv_debug ("low_findprog %s: returning cached (autoreload)\n", fname);    return ret;    }   #endif    -  object compiler_lock = DefaultCompilerEnvironment->lock(); +  object compiler_lock = lock_compiler();    if(!undefinedp(ret = programs[fname]) && (ret != no_value)) {    destruct(compiler_lock);    resolv_debug("low_findprog %s: returning cached (from other thread).\n",    fname);    return ret;    }       switch(ext)    {    case "":
pike.git/lib/master.pike.in:1556:   }      //   // This function is called by the compiler when a delayed compilation   // error occurs in the given program. It should remove all references   // to the program so that it can be freed.   //   void unregister(program p)   {    // werror("Unregistering %O...\n", p); -  object compiler_lock = DefaultCompilerEnvironment->lock(); +  object compiler_lock = lock_compiler();       if(string fname=rev_programs[p] || search(programs,p)) {    resolv_debug("unregister %s\n", fname);    if (m_delete (rev_programs, p))    m_delete (programs, fname);    else    programs[fname] = no_value;       string name = program_path_to_name (fname);    mixed n = has_value (name, ".") ?
pike.git/lib/master.pike.in:1895:      object low_cast_to_object(string oname, string current_file,    object|void current_handler)   {    program p;    object o;       p = low_cast_to_program(oname, current_file, current_handler, 1);    if(!p) return 0;    if(!objectp(o = objects[p])) { -  object compiler_lock = DefaultCompilerEnvironment->lock(); +  object compiler_lock = lock_compiler();    // NB: p might be a function in a fake_object...    if(!objectp(o = objects[p])) o = objects[p] = p();    destruct(compiler_lock);    }    return o;   }      //! This function is called when the drivers wants to cast a string   //! to an object because of an implict or explicit cast. This function   //! may also receive more arguments in the future.
pike.git/lib/master.pike.in:2147:    DEC_RESOLV_MSG_DEPTH();    resolv_debug("dirnode(%O)->ind(%O) => found subprogram %O:%O\n",    dirname, index, fname, ret);   #if constant(load_module)    if (has_suffix(fname, ".so")) {    // This is compatible with 7.4 behaviour.    if (!ret->_module_value) {    object o;    // NB: p might be a function in a fake_object...    if(!objectp(o = objects[ret])) { -  object compiler_lock = DefaultCompilerEnvironment->lock(); +  object compiler_lock = lock_compiler();    if(!objectp(o = objects[ret])) o = objects[ret] = ret();    destruct(compiler_lock);    }    ret = o;    }    if(mixed tmp=ret->_module_value) ret=tmp;    }   #endif    return ret;    }