pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1:   /*   || 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: program.c,v 1.768 2009/08/18 19:55:13 grubba Exp $ + || $Id: program.c,v 1.769 2009/09/08 16:49:31 grubba Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:7638:    *! @[report()]    */      /*! @decl void report(SeverityLevel severity, @    *! string filename, int linenumber, @    *! string subsystem, @    *! string message, mixed ... extra_args)    *!    *! Report a diagnostic from the compiler.    *! +  *! @param severity +  *! The severity of the diagnostic. +  *! +  *! The default implementation does the following depending on @[severity]: +  *! @int +  *! @value NOTICE +  *! Ignored. +  *! @value WARNING +  *! Calls @[MasterObject()->compile_warning()]. +  *! @value ERROR +  *! @value FATAL +  *! Calls @[MasterObject()->compile_error()]. +  *! @endint +  *! +  *! If there's no master object yet, the diagnostic is output to +  *! @[Stdio.stderr]. +  *! +  *! @param filename +  *! @param linenumber +  *! Location which triggered the diagnostic. +  *! +  *! @param subsystem +  *! Compiler subsystem that generated the diagnostic. +  *! +  *! @param message +  *! @[sprintf()]-style formatting string with the diagnostic message. +  *! +  *! @param extra_args +  *! Extra arguments to @[sprintf()]. +  *!    *! @seealso    *! @[PikeCompiler()->report()]    */   static void f_compilation_env_report(INT32 args)   {    int level;    struct pike_string *filename;    INT_TYPE linenumber;    struct pike_string *subsystem;    struct pike_string *message;
pike.git/src/program.c:7768:    } else {    pop_n_elems(args);    push_undefined();    }   }      /*! @decl object get_compilation_handler(int major, int minor)    *!    *! Get compatibility handler for Pike @[major].@[minor].    *! +  *! The default implementation calls the corresponding +  *! function in the master object. +  *!    *! @note    *! This function is typically called by    *! @[PikeCompiler()->get_compilation_handler()]. -  +  *! +  *! @seealso +  *! @[MasterObject()->get_compilation_handler()].    */   static void f_compilation_env_get_compilation_handler(INT32 args)   {    if(get_master())    {    APPLY_MASTER("get_compilation_handler", args);    } else {    pop_n_elems(args);    push_undefined();    }
pike.git/src/program.c:7803:    *! @type mapping(string:mixed)|object    *! Constant table to use.    *!    *! @type int(0..0)    *! Use the builtin constant table.    *! @endmixed    *!    *! @note    *! This function is typically called by    *! @[Pike_compiler()->get_default_module()]. +  *! +  *! @seealso +  *! @[MasterObject()->get_default_module()].    */   static void f_compilation_env_get_default_module(INT32 args)   {    if(get_master())    {    APPLY_MASTER("get_default_module", args);    } else {    pop_n_elems(args);    push_undefined();    }   }      /*! @decl program handle_inherit(string inh, string current_file, @    *! object|void handler)    *!    *! Look up an inherit @[inh]. -  +  *! +  *! The default implementation calls the corresponding function +  *! in the master object. +  *! +  *! @seealso +  *! @[MasterObject()->handle_inherit()].    */   static void f_compilation_env_handle_inherit(INT32 args)   {    if(get_master())    {    APPLY_MASTER("handle_inherit", args);    } else {    pop_n_elems(args);    push_undefined();    }   }      /*! @decl int filter_exception(SeverityLevel level, mixed err) -  +  *! +  *! The default implementation calls +  *! @[MasterObject()->compile_exception()] for @[level] @[ERROR] +  *! and @[FATAL]. +  *! +  *! @note +  *! This function is not implemented in Pike 7.8. +  *! +  *! @seealso +  *! @[MasterObject()->compile_exception()].    */   static void f_compilation_env_filter_exception(INT32 args)   {    int level;    struct svalue *err;       get_all_args("filter_exception", args, "%d%*", &level, &err);    if (args > 2) {    pop_n_elems(args-2);    args = 2;    }    -  + #if 0    if (level >= REPORT_WARNING) {    if (level >= REPORT_ERROR) {    APPLY_MASTER("compile_exception", 1); -  +  /* FIXME! */    } else {    push_int(level);    push_string(format_exception_for_error_msg(err)); -  +  /* FIXME! */    }    } -  + #endif +  +  pop_n_elems(args); +  push_undefined(); +  return;   }      /*! @class PikeCompiler    *!    *! The Pike compiler.    *!    *! An object of this class compiles a single string    *! of Pike code.    */