pike.git
/
lib
/
master.pike.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/master.pike.in:621:
mapping(string:int) load_time=([]); #else #define AUTORELOAD_CHECK_FILE(X) #define AUTORELOAD_BEGIN() #define AUTORELOAD_FINISH(VAR,CACHE,FILE) #endif // PIKE_AUTORELOAD
+
//!
protected class CompilerEnvironment {
-
+
//!
inherit predef::CompilerEnvironment : OrigCompilerEnvironment;
-
+
//!
mixed resolv(string identifier, string filename, object|void handler, object|void compat_handler) { return master()->resolv(identifier, filename, handler, compat_handler); }
-
+
//!
program handle_inherit(string inh, string current_file, object|void handler, object|void compat_handler) { return master()->handle_inherit(inh, current_file, handler, compat_handler); }
-
+
//!
program handle_import(string module, string current_file, object|void handler, object|void compat_handler) { return master()->handle_import(module, current_file, handler, compat_handler); } object get_compilation_handler(int major, int minor) { return master()->get_compilation_handler(major, minor); }
-
+
//!
int compile_exception(mixed err) { function(mixed:int) fun = master()->compile_exception; return fun && fun(err); }
-
+
//!
string format_exception(mixed err) { return 0; }
-
+
//!
class CPP {
-
+
//!
inherit ::this_program; #if constant(_static_modules.Builtin.__HAVE_CPP_NO_HANDLERS__)
-
+
//!
object handler; object compat_handler; #endif
-
+
//!
protected mixed apply_handler(string fun, mixed ... args) { function f; foreach(({ handler, compat_handler }), object o) { if (objectp(o) && functionp(f = predef::`->(o, fun))) { return f(@args); } } return CompilerEnvironment::`->(fun)(@args); }
pike.git/lib/master.pike.in:762:
sizeof(extra_args)? sprintf(message, @extra_args): message); return; } } } ::report(severity, filename, linenumber, subsystem, message, @extra_args); }
+
//!
object get_compilation_handler(int major, int minor) { return apply_handler(__func__, major, minor); } #if constant(_static_modules.Builtin.__HAVE_CPP_NO_HANDLERS__)
-
+
//!
mapping(string:string|function|object) get_predefines() { return apply_handler(__func__); }
-
+
//!
mixed resolv(string sym) { return apply_handler(__func__, sym, current_file, handler, compat_handler); }
-
+
//!
string handle_include(string header_file, string current_file, int(0..1) is_local_ref) { return apply_handler(__func__, header_file, current_file, is_local_ref); }
-
+
//!
string read_include(string filename) { return apply_handler(__func__, filename); } string decode_charset(string data, string charset) { return apply_handler(__func__, data, charset); } #endif string evaluate_define(string def, string|void arguments) { return apply_handler(__func__, def, arguments); }
-
+
//!
void change_cpp_compatibility(int major, int minor) { if ((compat_major == major) && (compat_minor == minor)) { return; } if (((major == __REAL_MAJOR__) && (minor == __REAL_MINOR__)) || (major < 0)) { compat_handler = UNDEFINED; } else { compat_handler = get_compilation_handler(major, minor); } ::change_cpp_compatibility(major, minor); }
-
+
//!
int compile_exception(mixed err) { return apply_handler(__func__, err); }
-
+
//!
string format_exception(mixed err) { string ret = apply_handler(__func__, err); if (ret) return ret; if (compile_exception(err)) { return ""; } return 0; }