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.260 2003/03/07 17:16:45 grubba Exp $ + // $Id: master.pike.in,v 1.261 2003/03/08 17:23:22 grubba Exp $      #pike __REAL_VERSION__      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif      // --- Some configurable parameters
pike.git/lib/master.pike.in:524:   #ifdef PIKE_MODULE_RELOC    fname = unrelocate_module(fname);   #endif      #ifdef PIKE_AUTORELOAD    if(!autoreload_on || load_time[fname]>=time())   #endif    {    if(!zero_type (ret=programs[fname])) {   #ifdef RESOLV_DEBUG -  werror ("low_findprog: %s returning cached (no autoreload)\n", fname); +  werror ("low_findprog: %s returning cached (no autoreload)\n" +  " %O\n", fname, ret);   #endif    return ret;    }    }      #ifdef __NT__    // Ugly kluge to work better with cygwin32    if(getenv("OSTYPE")=="cygwin32")    {    string tmp=fname[..1];
pike.git/lib/master.pike.in:601:    handler->compile_warning(oname, 0,    "Compiled file is out of date\n");    } else {    compile_warning(oname, 0, "Compiled file is out of date\n");    }    }    }    }      #ifdef RESOLV_DEBUG -  werror ("low_findprog: %s compiling\n", fname); +  werror ("low_findprog: %s compiling, mkobj:%O\n", fname, mkobj);   #endif    programs[fname]=ret=__empty_program(0, fname);    if ( mixed e=catch {    ret=compile_file(fname,    handler,    ret,    mkobj? (objects[ret]=__null_program()) : 0);    } )    { -  ret=programs[fname]=0; +  m_delete(objects, ret); +  ret=programs[fname]=0; // Negative cache.    throw(e);    }    break;   #if constant(load_module)    case ".so":    if (fname == "") {    werror( "low_findprog(\"%s\", \"%s\") => load_module(\"\")\n"    "%s\n", pname, ext, describe_backtrace(backtrace()) );    }   
pike.git/lib/master.pike.in:1014:    {    ret=1;    break;    }    if(!ret)    return UNDEFINED;       index = dirname+"/"+index;   #ifdef MODULE_TRACE    werror("%*nDirnode(%O) findmodule(%O)\n", -  sizeof(backtrace()), dirname, dirname+"/"+index); +  sizeof(backtrace()), dirname, index);   #endif -  if(object o=findmodule(index, handler)) +  object o; +  if(objectp(o=findmodule(index, handler)))    {    if(mixed tmp=o->_module_value) o=tmp; -  + #ifdef MODULE_TRACE +  werror("%*nDirnode(%O) findmodule(%O) ==> %O\n", +  sizeof(backtrace()), dirname, index, o); + #endif    return o;    }    if (program p=cast_to_program( index, 0, handler ))    { -  + #ifdef MODULE_TRACE +  werror("%*nDirnode(%O) cast_to_program(%O) ==> %O\n", +  sizeof(backtrace()), dirname, index, p); + #endif    return p;    } -  + #ifdef MODULE_TRACE +  werror("%*nDirnode(%O)->`[](%O) FAILED\n", +  sizeof(backtrace()), dirname, index); + #endif    return UNDEFINED;    }       mixed `[](string index)    {    mixed ret;   #ifdef MODULE_TRACE    werror("%*nDirnode(%O) cache[%O] ?????\n",    sizeof(backtrace()),dirname,index);   #endif    if(!zero_type(ret=cache[index]))    {   #ifdef MODULE_TRACE -  werror("%*nDirnode(%O) cache[%O] -> %O\n", -  sizeof(backtrace()),dirname,index, ret); +  werror("%*nDirnode(%O) cache[%O] -> %O%s\n", +  sizeof(backtrace()),dirname,index, ret, +  (ret != ZERO_TYPE)?"":" (zero_type)");   #endif    if (ret != ZERO_TYPE) return ret; -  + #ifdef MODULE_TRACE +  werror("%*nDirnode(%O) ZERO_TYPE!\n", +  sizeof(backtrace()),dirname); + #endif    return UNDEFINED;    }    ret=ind(index);       // We might have gotten placeholder objects in the first pass    // which must not be cached to the second. -  if(ret == predef::__placeholder_object) return ret; +  if(ret == predef::__placeholder_object) { + #ifdef MODULE_TRACE +  werror("%*nDirnode(%O) PLACE_HOLDER.\n", +  sizeof(backtrace()),dirname); + #endif +  return ret; +  }       cache[index] = zero_type(ret) ? ZERO_TYPE : ret;    return ret;    }       static int(0..1) _cache_full;    void fill_cache()    {   #ifdef RESOLV_DEBUG    werror(describe_backtrace(({ sprintf("Filling cache in dirnode %O\n",
pike.git/lib/master.pike.in:1253:      object findmodule(string fullname, object|void handler)   {    object o;   #ifdef MODULE_TRACE    werror("%*nfindmodule(%O)\n",sizeof(backtrace()),fullname);   #endif    if(!zero_type(o=fc[fullname]))    {   // werror("fc[%O] -> %O\n",fullname, o); +  if (objectp(o)) return o;    if (o == 0) return UNDEFINED;    return o;    }       if(Stat stat=master_file_stat(fakeroot(fullname+".pmod")))    {    if(stat[1]==-2)    return dirnode(fullname+".pmod", handler);    }