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.310 2003/11/14 06:11:38 mast Exp $ + // $Id: master.pike.in,v 1.311 2003/11/18 11:03:45 mast 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:292:   //! @appears compile_string   //! Compile the Pike code in the string @[source] into a program.   //! If @[filename] is not specified, it will default to @expr{"-"@}.   //!   //! Functionally equal to @expr{@[compile](@[cpp](@[source], @[filename]))@}.   //!   //! @seealso   //! @[compile()], @[cpp()], @[compile_file()]   //!   program compile_string(string source, void|string filename, -  object|void handler) +  object|void handler, +  void|program p, +  void|object o)   {    return compile(cpp(source, filename||"-", 1, handler,    compat_major, compat_minor),    handler,    compat_major, -  compat_minor); +  compat_minor, +  p, +  o);   }      //!   string master_read_file(string file)   {    object o=Files()->Fd();    if( ([function(string, string : int)]o->open)(fakeroot(file),"r") )    return ([function(void : string)]o->read)();    return 0;   }
pike.git/lib/master.pike.in:749:    } else if (out_of_date_warning) {    call_compile_warning (handler, oname,    "Compiled file is out of date");    }    }    }       resolv_debug ("low_findprog %s: compiling, mkobj: %O\n", fname, mkobj);    INC_RESOLV_MSG_DEPTH();    programs[fname]=ret=__empty_program(0, fname); +  AUTORELOAD_CHECK_FILE (fname); +  string src; +  if (array|object err = catch (src = master_read_file (fname))) { +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("low_findprog %s: failed to read file\n", fname); +  objects[ret] = no_value; +  ret=programs[fname]=0; // Negative cache. +  compile_cb_rethrow (err); +  }    if ( mixed e=catch { -  ret=compile_file(fname, -  handler, +  ret=compile_string(src, fname, handler,    ret,    mkobj? (objects[ret]=__null_program()) : 0);    } )    {    DEC_RESOLV_MSG_DEPTH();    resolv_debug ("low_findprog %s: compilation failed\n", fname);    objects[ret] = no_value;    ret=programs[fname]=0; // Negative cache.    throw(e);    }    DEC_RESOLV_MSG_DEPTH();    resolv_debug ("low_findprog %s: compilation ok\n", fname);    break;   #if constant(load_module)    case ".so":    if (fname == "") {    werror( "low_findprog(\"%s\", \"%s\") => load_module(\"\")\n"    "%s\n", pname, ext, describe_backtrace(backtrace()) );    }    -  if (array|object err = catch (ret = load_module(fakeroot(fname)))) +  if (array|object err = catch (ret = load_module(fakeroot(fname)))) { +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("low_findprog %s: failed to load binary\n", fname); +  objects[ret] = no_value; +  ret=programs[fname]=0; // Negative cache.    compile_cb_rethrow (err); -  +  }    resolv_debug ("low_findprog %s: loaded binary\n", fname);   #endif /* load_module */    }       AUTORELOAD_FINISH(ret,programs,fname);       resolv_debug("low_findprog %s: returning %O\n", fname, ret);       return programs[fname]=ret;    }
pike.git/lib/master.pike.in:2047:    local_include);    }    }    // Failed.    return 0;    }       //!    string read_include(string f)    { -  AUTORELOAD_CHECK_FILE(f) -  return master_read_file(f); +  AUTORELOAD_CHECK_FILE(f); +  if (array|object err = catch { +  return master_read_file (f); +  }) +  compile_cb_rethrow (err);    }       string _sprintf(int t)    {    return t=='O' && sprintf("CompatResolver(%O)",ver);    }   }      inherit CompatResolver;