pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.98 2000/02/04 16:35:46 grubba Exp $ +  * $Id: master.pike.in,v 1.99 2000/02/10 17:57:37 hubbe Exp $    *    * Master-file for Pike.    *    * Based on master.pike 1.67.    */      // Some configurable parameters useful for debugging      #define PIKE_AUTORELOAD   
pike.git/lib/master.pike.in:243:   mapping (string:program) programs=(["/master":object_program(this_object())]);      #define capitalize(X) (upper_case((X)[..0])+(X)[1..])      array(string) query_precompiled_names(string fname)   {    // Filenames of potential precompiled files in priority order.    return ({ fname + ".o" });   }    + #if constant(_static_modules.Builtin.mutex) + #define THREADED + object compilation_mutex = _static_modules.Builtin()->mutex(); + #endif +    static program low_findprog(string pname, string ext, object|void handler)   {    program ret;    array s;    string fname=pname+ext;    -  + #ifdef THREADED +  object key=compilation_mutex->lock(2); + #endif +    #ifdef PIKE_AUTORELOAD    if(!autoreload_on || load_time[fname]>=time())   #endif    {    if(!zero_type (ret=programs[fname])) return ret;    }       if( (s=master_file_stat(fname)) && s[1]>=0 )    {    AUTORELOAD_BEGIN();
pike.git/lib/master.pike.in:300:    if (handler) {    handler->compile_warning(oname, 0,    "Compiled file is out of date\n");    } else {    compile_warning(oname, 0, "Compiled file is out of date\n");    }    }    }    }    + // werror("2.5: %O\n",fname);       if ( mixed e=catch { ret=compile_file(fname); } )    { -  + // werror("-3: %O\n",fname);    programs[fname]=0;    if(arrayp(e) && sizeof(e) && e[0] == "Compilation failed.\n")    e[1]=({});    throw(e);    }    break;   #if constant(load_module)    case ".so":    if (fname == "") {    werror(sprintf("low_find_prog(\"%s\", \"%s\") => load_module(\"\")\n"    "%s\n", pname, ext, describe_backtrace(backtrace())));    }    ret=load_module(fname);   #endif /* load_module */    }       AUTORELOAD_FINISH(ret,programs,fname);    -  + // werror("3: %O\n",fname);    return programs[fname]=ret;    }    return 0;   }      static program findprog(string pname, string ext, object|void handler)   {    switch(ext)    {    case ".pike":