pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1978:    if(!IS_UNDEFINED (Pike_sp-1))    {    ret=mkconstantsvaluenode(Pike_sp-1);    }    }    pop_stack();       return ret;   }    - /* This function is intended to simplify resolving of + /** +  * This function is intended to simplify resolving of    * program symbols during compile-time for C-modules.    *    * A typical use-case is for a C-module inheriting    * code written in Pike.    */   PMOD_EXPORT struct program *resolve_program(struct pike_string *ident)   {    struct program *ret = NULL;    struct node_s *n = resolve_identifier(ident);    if (n) {
pike.git/src/program.c:2018:    */      /*! @decl constant this_program    *!    *! Builtin constant that evaluates to the current program.    *!    *! @seealso    *! @[this], @[this_object()]    */    - /* If the identifier is recognized as one of the magic identifiers, + /** +  * If the identifier is recognized as one of the magic identifiers,    * like "this", "this_program" or "`->" when preceded by ::, then a    * suitable node is returned, NULL otherwise.    * -  * inherit_num is -1 when no specific inherit has been specified; ie -  * either when the identifier has no prefix (colon_colon_ref == 0) or -  * when the identifier has the prefix :: without any preceding identifier -  * (colon_colon_ref == 1). +  * @param inherit_num +  * Inherit number in state->new_program that the identifier has been +  * qualified with. -1 when no specific inherit has been specified; ie +  * either when the identifier has no prefix (colon_colon_ref == 0) or +  * when the identifier has the prefix :: without any preceding identifier +  * (colon_colon_ref == 1).    *    * New in Pike 7.9.5 and later:    *    * If colon_colon_ref is 1 and the selected inherit defines the    * `->() lfun, code calling the lfun will be generated as follows:    *    * inh::`->(ident, inh::this, 1)    */   struct node_s *program_magic_identifier (struct program_state *state,    int state_depth, int inherit_num,
pike.git/src/program.c:2324:    *    * end_first_pass ==> PROGRAM_PASS_1_DONE    *    * fixate_program ==> PROGRAM_FIXED    *    * optimize_program ==> PROGRAM_OPTIMIZED    *    * end_first_pass(1) ==> PROGRAM_FINISHED    */    - /* Re-allocate all the memory in the program in one chunk. because: -  * 1) The individual blocks are much bigger than they need to be -  * 2) cuts down on malloc overhead (maybe) -  * 3) localizes memory access (decreases paging) + /** +  * Re-allocate all the memory in the program in one chunk. because: +  * @b 1) The individual blocks are much bigger than they need to be +  * @b 2) cuts down on malloc overhead (maybe) +  * @b 3) localizes memory access (decreases paging)    */   void optimize_program(struct program *p)   {    size_t size=0;    char *data;       /* Already done (shouldn't happen, but who knows?) */    if(p->flags & PROGRAM_OPTIMIZED) return;      #ifdef PIKE_USE_MACHINE_CODE
pike.git/src/program.c:2862:       GC_ALLOC(p);    p->id=++current_program_id;    INIT_PIKE_MEMOBJ(p, T_PROGRAM);       DOUBLELINK(first_program, p);    ACCURATE_GETTIMEOFDAY(& p->timestamp);    return p;   }    - /* + /**    * Start building a new program    */   void low_start_new_program(struct program *p,    int pass,    struct pike_string *name,    int flags,    int *idp)   {    struct compilation *c = THIS_COMPILATION;    int id=0;
pike.git/src/program.c:3944:   static int add_variant_dispatcher(struct pike_string *name,    struct pike_type *type,    int id_flags)   {    union idptr dispatch_fun;    dispatch_fun.c_fun = f_dispatch_variant;    return define_function(name, type, id_flags & ~(ID_VARIANT|ID_LOCAL),    IDENTIFIER_C_FUNCTION, &dispatch_fun, 0);   }    - /* Note: This function is misnamed, since it's run after both passes. /mast */ - /* finish-states: + /** +  * End the current compilation pass.    * -  +  * @param finish +  * finish-state: +  *    * 0: First pass.    * 1: Last pass.    * 2: Called from decode_value(). -  +  * +  * Note: This function is misnamed, since it's run after all passes.    */   struct program *end_first_pass(int finish)   {    struct compilation *c = THIS_COMPILATION;    int e;    struct program *prog = Pike_compiler->new_program;    struct pike_string *init_name;    int num_refs = prog->num_identifier_references;    union idptr dispatch_fun;   
pike.git/src/program.c:4210: Inside #if 0 and #if defined(PIKE_USE_MACHINE_CODE)
  #ifdef PIKE_USE_MACHINE_CODE    if (prog &&    (((unsigned long long *)prog->program)[-1] != 0xdeadfeedf00dfaddLL)) {    Pike_fatal("Bad mexec magic!\n");    }   #endif /* PIKE_USE_MACHINE_CODE */   #endif /* 0 */    return prog;   }    - /* + /**    * Finish this program, returning the newly built program    */   PMOD_EXPORT struct program *debug_end_program(void)   {    return end_first_pass(1);   }       - /* + /**    * Allocate space needed for this program in the object structure.    * An offset to the data is returned.    */   PMOD_EXPORT size_t low_add_storage(size_t size, size_t alignment,    ptrdiff_t modulo_orig)   {    ptrdiff_t offset;    ptrdiff_t modulo;       if(!size) return Pike_compiler->new_program->storage_needed;
pike.git/src/program.c:4352:    add_to_program(Pike_compiler->new_program->event_handler);   #else /* !HAVE_COMPUTED_GOTO */    for(e=0;e<sizeof(Pike_compiler->new_program->event_handler);e++)    add_to_program(tmp[e]);   #endif /* HAVE_COMPUTED_GOTO */    }    Pike_compiler->new_program->event_handler=compat_event_handler;    }   }    - /* + /**    * Set a callback to be called when this program is cloned.    *    * This function is obsolete; see pike_set_prog_event_callback for    * details.    */   PMOD_EXPORT void set_init_callback(void (*init)(struct object *))   {    add_compat_event_handler();    ((oldhandlertype *)Pike_compiler->new_program->program)[PROG_EVENT_INIT]=init;   }    - /* + /**    * Set a callback to be called when clones of this program are    * destructed.    *    * This function is obsolete; see pike_set_prog_event_callback for    * details.    *    * Note: If the callback only does very trivial stuff, like freeing or    * clearing a few pointers in the object storage, you can do    *    * Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;
pike.git/src/program.c:4388:    * called out of order for PROG_EVENT_EXIT events; see the docs for    * PROGRAM_LIVE_OBJ in program.h for further details.    */   PMOD_EXPORT void set_exit_callback(void (*exit)(struct object *))   {    add_compat_event_handler();    ((oldhandlertype *)Pike_compiler->new_program->program)[PROG_EVENT_EXIT]=exit;    Pike_compiler->new_program->flags |= PROGRAM_LIVE_OBJ;   }    - /* + /**    * This callback is used by the gc to traverse all references to    * things in memory. It should call some gc_recurse_* function exactly    * once for each reference that the pike internals doesn't know about.    *    * If a reference is shared between objects, it should be traversed    * once for every instance sharing it.    *    * The callback might be called more than once for the same instance    * during a gc pass. The gc assumes that the references are enumerated    * in the same order in that case.
pike.git/src/program.c:4423:    *    * This function is obsolete; see pike_set_prog_event_callback for    * details.    */   PMOD_EXPORT void set_gc_recurse_callback(void (*m)(struct object *))   {    add_compat_event_handler();    ((oldhandlertype *)Pike_compiler->new_program->program)[PROG_EVENT_GC_RECURSE]=m;   }    - /* + /**    * This callback is used by the gc to count all references to things    * in memory. It should call gc_check, gc_check_(weak_)svalues or    * gc_check_(weak_)short_svalue exactly once for each reference that    * the pike internals don't know about.    *    * If a reference is shared between objects, it should be counted once    * for all shared instances. The return value from gc_check is useful    * to ensure this; it's zero when called the first time for its    * argument (it is perfectly fine to use gc_check on things that the    * pike core doesn't know about, but they must have an INT32 refcount
pike.git/src/program.c:4445:    *    * This function is obsolete; see pike_set_prog_event_callback for    * details.    */   PMOD_EXPORT void set_gc_check_callback(void (*m)(struct object *))   {    add_compat_event_handler();    ((oldhandlertype *)Pike_compiler->new_program->program)[PROG_EVENT_GC_CHECK]=m;   }    - /* + /**    * Set a callback to be called when any of the special program events    * occur. The event type is sent as an integer argument. The events    * include, but might not be limited to, the following:    *    * PROG_EVENT_INIT    * An object is being cloned from the program. See set_init_callback    * for details.    * PROG_EVENT_EXIT    * An object is being destructed. See set_exit_callback for details.    * PROG_EVENT_GC_RECURSE
pike.git/src/program.c:4494:      PMOD_EXPORT void pike_set_prog_optimize_callback(node *(*opt)(node *))   {   #ifdef PIKE_DEBUG    if(Pike_compiler->new_program->optimize)    Pike_fatal("Program already has an optimize handler!\n");   #endif    Pike_compiler->new_program->optimize = opt;   }    + /** +  * Reference an inherited identifier. +  * +  * @param q +  * Program state for the program being compiled that will have +  * the reference added. May be NULL to indicate Pike_compiler. +  * +  * @param i +  * Inherit number in q->new_program. +  * +  * @param f +  * Reference number in q->new_program->inherit[i].prog. +  * +  * @return +  * Returns an equivalent reference that is INLINE|HIDDEN. +  */   PMOD_EXPORT int really_low_reference_inherited_identifier(struct program_state *q,    int i,    int f)   {    struct program *np=(q?q:Pike_compiler)->new_program;    struct reference funp;    struct program *p;    int d, num_id_refs;       if(f==-1) return -1;
pike.git/src/program.c:4598:    if (p->inherits[e].inherit_level >= level) continue;    if (name == p->inherits[e].name) {    res = e;    level = p->inherits[e].inherit_level;    if (level == 1) break;    }    }    return res;   }    - /* Reference the symbol inherit::name in the lexical context + /** +  * Reference the symbol inherit::name in the lexical context    * specified by state.    * -  * Returns the reference in state->new_program if found. +  * @return Returns the reference in state->new_program if found.    */   PMOD_EXPORT int reference_inherited_identifier(struct program_state *state,    struct pike_string *inherit,    struct pike_string *name)   {    int e, id;    struct program *p;      #ifdef PIKE_DEBUG    if (name != debug_findstring(name))
pike.git/src/program.c:4971:       fun.inherit_offset += inherit_offset;       fun.run_time_type = PIKE_T_UNKNOWN; /* Invalidate the vtable cache. */       if (fun.id_flags & ID_FINAL)    {    Pike_compiler->flags |= COMPILATION_CHECK_FINAL;    }    +  if (flags & ID_PUBLIC) +  fun.id_flags &= ~(ID_PRIVATE|ID_PUBLIC); +     if(fun.id_flags & ID_PRIVATE) fun.id_flags|=ID_HIDDEN;    -  if (fun.id_flags & ID_PUBLIC) -  fun.id_flags |= flags & ~ID_PRIVATE; -  else -  fun.id_flags |= flags; +  fun.id_flags |= flags & ~ID_PUBLIC;       fun.id_flags |= ID_INHERITED;    add_to_identifier_references(fun);    }   }    - /* -  * make this program inherit another program + /** +  * Make the program being compiled inherit another program. +  * +  * @param p +  * Program to inherit. +  * +  * @param parent +  * Object containing p (if applicable). +  * +  * @param parent_identifier +  * Identifier reference in parent->prog that is p. +  * +  * @param parent_offset +  * Lexical scope to parent from the program being compiled +  * offsetted by 42, or OBJECT_PARENT or INHERIT_PARENT. +  * +  * @param flags +  * Modifier flags for the inherit. +  * +  * @param name +  * Optional rename of the inherit.    */   PMOD_EXPORT void low_inherit(struct program *p,    struct object *parent,    int parent_identifier,    int parent_offset,    INT32 flags,    struct pike_string *name)   {    lower_inherit(p, parent, parent_identifier, parent_offset, flags, name);   
pike.git/src/program.c:5152:    if(name)    {    free_string(s);    s=name;    }    do_inherit(Pike_sp-1, flags, s);    free_string(s);    pop_stack();   }    - /* -  * Return the index of the identifier found, otherwise -1. + /** +  * Find an identifier relative to the program being compiled. +  * +  * @return Return the index of the identifier found, otherwise -1.    */   int isidentifier(struct pike_string *s)   {    return really_low_find_shared_string_identifier(s,    Pike_compiler->new_program,    SEE_PROTECTED|SEE_PRIVATE);   }      /*    * Definition of identifiers.
pike.git/src/program.c:5176:    *    * IDENTIFIER_VARIABLE - A value stored in object->storage    * IDENTIFIER_CONSTANT - A value stored in program->constants    * IDENTIFIER_FUNCTION - Either a C function or a Pike function    * and    * IDENTIFIER_ALIAS - An alias for a different identifier.    *    */       - /* Define an alias for a (possibly extern) identifier. + /** +  * Define an alias for a (possibly extern) identifier.    *    * Note that both type and name may be NULL. If they are NULL    * they will be defaulted to the values from the aliased identifier.    */   int low_define_alias(struct pike_string *name, struct pike_type *type,    int flags, int depth, int refno)   {    int n;    int e;   
pike.git/src/program.c:6000:    id=make_shared_binary_string(name,namelen);    ret=add_constant(id, &tmp, flags);    /* The following is not really true, but it helps encode_value()... */    Pike_compiler->new_program->flags |=    tmp.u.program->flags & PROGRAM_HAS_C_METHODS;    free_string(id);    free_svalue(&tmp);    return ret;   }    - /* -  * define a new function + /** +  * Define a new function. +  *    * if func isn't given, it is supposed to be a prototype.    */   INT32 define_function(struct pike_string *name,    struct pike_type *type,    unsigned flags,    unsigned function_flags,    union idptr *func,    unsigned opt_flags)   {    struct compilation *c = THIS_COMPILATION;
pike.git/src/program.c:6525: Inside #if 0
   ref.identifier_offset = i;    ref.inherit_offset = 0;    ref.run_time_type = PIKE_T_UNKNOWN;    add_to_identifier_references(ref);    state->new_program->flags |= PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;    return j;   }      #endif /* 0 */    - /* Identifier lookup + /** +  * Identifier lookup    *    * The search algorithm has changed several times during Pike 7.3.    *    * It now (Pike 7.3.33 and later) looks up the most recent definition    * in the most recent inherit.    *    * In Pike 7.3.23 -- 7.3.32 it looked up the most recent definition    * with the least inherit depth.    *    * In Pike 7.3.22 and prior, it looked up the last definition regardless
pike.git/src/program.c:6901:      int lfun_lookup_id(struct pike_string *lfun_name)   {    struct svalue *id = low_mapping_string_lookup(lfun_ids, lfun_name);    if (!id) return -1;    if (TYPEOF(*id) == T_INT) return id->u.integer;    my_yyerror("Bad entry in lfun lookup table for %S.", lfun_name);    return -1;   }    - /* -  * lookup the number of a function in a program given the name in + /** +  * Lookup the number of a function in a program given the name in    * a shared_string    */   int low_find_shared_string_identifier(struct pike_string *name,    struct program *prog)   {    int max,min,tst;    struct identifier *fun;       if(prog->flags & PROGRAM_FIXED)    {
pike.git/src/program.c:7692:    buffer = buf;    if (len > NELEM (buf) - 1)    len = NELEM (buf) - 1;    }    memcpy (buffer, file, len);    buffer[len] = 0;    return buffer;    }   }    - /* Same as low_get_program_line but returns a plain char *. It's + /** +  * Same as low_get_program_line but returns a plain char *. It's    * malloced if the malloced flag is set, otherwise it's a pointer to a    * static buffer which might be clobbered by later calls.    *    * This function is useful when the shared string table has been freed    * and in sensitive parts of the gc where the shared string structures    * can't be touched. It also converts wide strings to ordinary ones    * with escaping.    */   PMOD_EXPORT char *low_get_program_line_plain(struct program *prog,    INT_TYPE *linep,
pike.git/src/program.c:7717:    if (prog->linenumbers) {    struct pike_string *file;    FIND_PROGRAM_LINE (prog, file, (*linep));    if (file)    return make_plain_file(file, malloced);    }       return NULL;   }    - /* Returns the file where the program is defined. The line of the + /** +  * Returns the file where the program is defined. The line of the    * class start is written to linep, or 0 if the program is the top -  * level of the file. */ +  * level of the file. +  */   PMOD_EXPORT struct pike_string *get_program_line(struct program *prog,    INT_TYPE *linep)   {    struct pike_string *res = low_get_program_line(prog, linep);    if (!res) {    struct pike_string *dash;    REF_MAKE_CONST_STRING(dash, "-");    return dash;    }    return res;
pike.git/src/program.c:7795:    pc, prog->program, (void *)prog->num_program);    }    } else {    fprintf(stderr, "No program of linenumbers program:%p linenumbers:%p\n",    prog->program, prog->linenumbers);    }       return NULL;   }    - /* This is to low_get_line as low_get_program_line_plain is to -  * low_get_program_line. */ + /** +  * This is to low_get_line as low_get_program_line_plain is to +  * low_get_program_line. +  */   PMOD_EXPORT char *low_get_line_plain (PIKE_OPCODE_T *pc, struct program *prog,    INT_TYPE *linep, int malloced)   {    linep[0] = 0;       if (prog->program && prog->linenumbers) {    ptrdiff_t offset = pc - prog->program;       if ((offset < (ptrdiff_t)prog->num_program) && (offset >= 0)) {    char *cnt = prog->linenumbers;
pike.git/src/program.c:7854: Inside #if defined(PIKE_DEBUG)
     void gdb_get_line (PIKE_OPCODE_T *pc, struct program *prog)   {    INT_TYPE line;    char *file = low_get_line_plain (pc, prog, &line, 0);    fprintf (stderr, "%s:%ld\n", file, (long)line);   }      #endif    - /* -  * return the file in which we were executing. pc should be the + /** +  * Return the file in which we were executing. pc should be the    * program counter (i.e. the address in prog->program), prog the    * current program, and line will be initialized to the line in that    * file.    */   PMOD_EXPORT struct pike_string *get_line(PIKE_OPCODE_T *pc,    struct program *prog,    INT_TYPE *linep)   {    struct pike_string *res;   
pike.git/src/program.c:7916:    if ((ret = get_identifier_line(o->prog, fun, linep))) {    add_ref(ret);    return ret;    }    return low_get_program_line(o->prog, linep);    }    *linep = 0;    return NULL;   }    - /* Return the file and line where the identifier with reference number + /** +  * Return the file and line where the identifier with reference number    * fun was defined.    *    * Note: Unlike the other get*line() functions, this one does not    * add a reference to the returned string.    */   PMOD_EXPORT struct pike_string *get_identifier_line(struct program *p,    int fun,    INT_TYPE *linep)   {    struct reference *ref = PTR_FROM_INT(p, fun);    struct identifier *id = ID_FROM_PTR(p, ref);    p = PROG_FROM_PTR(p, ref);    if (id->filename_strno >= p->num_strings) return NULL;    if (linep) *linep = id->linenumber;    return p->strings[id->filename_strno];   }    - /* Main entry point for compiler messages originating from -  * C-code. + /** +  * Main entry point for compiler messages originating from C-code.    *    * Sends the message along to PikeCompiler()->report().    *    * NOTE: The format string fmt (and vargs) is only formatted with    * string_builder_vsprintf() if the number of extra    * Pike stack arguments (args) is zero.    *    * NOTE: This function may be called from functions that sometimes    * execute outside of the compilation context, eg by    * __handle_sprintf_format(), which can be called directly
pike.git/src/program.c:8069:    va_start(vargs,fmt);    va_yyreport(REPORT_ERROR, NULL, 0, parser_system_string, 0, fmt, vargs);    va_end(vargs);   }      PMOD_EXPORT void yyerror(const char *str)   {    my_yyerror("%s", str);   }    - /* Main entry point for errors from the type-checking subsystems. + /** +  * Main entry point for errors from the type-checking subsystems.    *    * The message (if any) will be formatted for the same source    * position as the got_t.    *    * The expect_t will be formatted for the same position as the got_t    * if there's no expected_file/expected_line.    *    * The got_t will be formatted for the current lex position if there's    * no got_file/got_line.    */
pike.git/src/program.c:10146:    string_builder_strcat(&buf, "UNDEFINED, ");    }    string_builder_sprintf(&buf, "%d, %d, %s, %s)",    c->major, c->minor,    c->target?"target":"UNDEFINED",    c->placeholder?"placeholder":"UNDEFINED");    pop_n_elems(args);    push_string(finish_string_builder(&buf));   }    - /* Fake being called via PikeCompiler()->compile() + /** +  * Fake being called via PikeCompiler()->compile()    *    * This function is used to set up the environment for    * compiling C efuns and modules.    *    * Note: Since this is a stack frame, it will be cleaned up    * automatically on error, so no need to use ONERROR().    *    * Note: Steals a reference from ce.    */   static void low_enter_compiler(struct object *ce, int inherit)
pike.git/src/program.c:10215:    c = THIS_COMPILATION;    if (filename) {    free_string(c->lex.current_file);    copy_shared_string(c->lex.current_file, filename);    }    if (linenumber) {    c->lex.current_line = linenumber;    }   }    - /* Reverse the effect of enter_compiler(). + /** +  * Reverse the effect of enter_compiler().    */   PMOD_EXPORT void exit_compiler(void)   {   #ifdef PIKE_DEBUG    if ((Pike_fp->current_program != compilation_program) ||    (Pike_fp->fun != PC_COMPILE_FUN_NUM)) {    Pike_fatal("exit_compiler(): Frame stack out of whack!\n");    }   #endif /* PIKE_DEBUG */    POP_PIKE_FRAME();
pike.git/src/program.c:10264:      /*! @endclass    */      /*! @endclass    */      /*! @endclass    */    - /* Strap the compiler by creating the compilation program by hand. */ + /** +  * Strap the compiler by creating the compilation program by hand. +  */   static void compile_compiler(void)   {    struct program *p = low_allocate_program();    struct program *p2 = compilation_program = low_allocate_program();    struct object *co;    struct inherit *inh;       p->parent_info_storage = -1;    /* p->event_handler = compilation_env_event_handler; */    p->flags |= PROGRAM_HAS_C_METHODS;
pike.git/src/program.c:11686: Inside #if 0
   return i;    }    }    }    return -1;   }   #endif /* 0 */          - /* returns 1 if a implements b */ + /** +  * @return Returns 1 if a implements b. +  */   static int low_implements(struct program *a, struct program *b)   {    DECLARE_CYCLIC();    int e;    int ret = 1;    struct pike_string *s=findstring("__INIT");       if (BEGIN_CYCLIC(a, b)) {    END_CYCLIC();    return 1; /* Tentatively ok, */
pike.git/src/program.c:11749:      #define IMPLEMENTS_CACHE_SIZE 1024   struct implements_cache_s { INT32 aid, bid, ret; };   static struct implements_cache_s implements_cache[IMPLEMENTS_CACHE_SIZE];      static int implements_hval( INT32 aid, INT32 bid )   {    return ((aid<<4) ^ bid ^ (aid>>4)) & (IMPLEMENTS_CACHE_SIZE-1);   }    - /* returns 1 if a implements b, but faster */ + /** +  * @return Returns 1 if a implements b, but faster. +  */   PMOD_EXPORT int implements(struct program *a, struct program *b)   {    unsigned long hval;    if(!a || !b) return -1;    if(a==b) return 1;       hval = implements_hval(a->id,b->id);    if(implements_cache[hval].aid==a->id && implements_cache[hval].bid==b->id)    {    return implements_cache[hval].ret;
pike.git/src/program.c:11772:    implements_cache[hval].aid=a->id;    implements_cache[hval].bid=b->id;    implements_cache[hval].ret = 1; /* Tentatively compatible. */    implements_cache[hval].ret = low_implements(a,b);    /* NOTE: If low_implements() returns 0, the cache may have received    * some false positives. Those should be cleared.    */    return implements_cache[hval].ret;   }    - /* Returns 1 if a is compatible with b */ + /** +  * @return Returns 1 if a is compatible with b. +  */   static int low_is_compatible(struct program *a, struct program *b)   {    DECLARE_CYCLIC();    int e;    int ret = 1;    struct pike_string *s=findstring("__INIT");       if (BEGIN_CYCLIC(a, b)) {    END_CYCLIC();    return 1;
pike.git/src/program.c:11827:    ret = 0;    break;    }    }       END_CYCLIC();    return ret;   }      static struct implements_cache_s is_compatible_cache[IMPLEMENTS_CACHE_SIZE]; - /* Returns 1 if a is compatible with b + /** +  * Returns 1 if a is compatible with b. +  *    * ie it's possible to write a hypothetical c that implements both.    */   PMOD_EXPORT int is_compatible(struct program *a, struct program *b)   {    unsigned long hval;    unsigned long rhval;    int aid, bid;    if(!a || !b) return -1;    if(a==b) return 1;   
pike.git/src/program.c:11879:    is_compatible_cache[hval].aid=aid;    is_compatible_cache[hval].bid=bid;    is_compatible_cache[hval].ret = 1; /* Tentatively compatible. */    is_compatible_cache[hval].ret = low_is_compatible(a,b);    /* NOTE: If low_is compatible() returns 0, the cache may have received    * some false positives. Those should be cleared.    */    return is_compatible_cache[hval].ret;   }    - /* Explains why a is not compatible with b */ + /** +  * Explains why a is not compatible with b. +  */   void yyexplain_not_compatible(int severity_level,    struct program *a, struct program *b)   {    int e;    struct pike_string *s=findstring("__INIT");    int res = 1;    INT_TYPE a_line = 0;    INT_TYPE b_line = 0;    struct pike_string *a_file;    struct pike_string *b_file;
pike.git/src/program.c:11949:    bid_file, bid_line, bid->type, 3,    "Identifier %s in %O is incompatible with the same in %O.");    }    }    free_string(b_file);    free_string(a_file);    END_CYCLIC();    return;   }    - /* Explains why a does not implement b */ + /** +  * Explains why a does not implement b. +  */   void yyexplain_not_implements(int severity_level,    struct program *a, struct program *b)   {    int e;    struct pike_string *s=findstring("__INIT");    INT_TYPE a_line = 0;    INT_TYPE b_line = 0;    struct pike_string *a_file;    struct pike_string *b_file;    DECLARE_CYCLIC();
pike.git/src/program.c:12022:    }    continue;    }    }    free_string(b_file);    free_string(a_file);    END_CYCLIC();   }      /* FIXME: Code duplication of yyexplain_not_compatible() above! */ - /* Explains why a is not compatible with b */ + /** +  * Explains why a is not compatible with b. +  */   void string_builder_explain_not_compatible(struct string_builder *s,    struct program *a,    struct program *b)   {    int e;    struct pike_string *init_string = findstring("__INIT");    int res = 1;    DECLARE_CYCLIC();       /* Optimize the loop somewhat */
pike.git/src/program.c:12086:    Pike_sp-2,    Pike_sp-1);    pop_n_elems(4);    }    }    END_CYCLIC();    return;   }      /* FIXME: code duplication of yyexplain_not_implements() above! */ - /* Explains why a does not implement b */ + /** +  * Explains why a does not implement b. +  */   void string_builder_explain_not_implements(struct string_builder *s,    struct program *a,    struct program *b)   {    int e;    struct pike_string *init_string = findstring("__INIT");    DECLARE_CYCLIC();       if (BEGIN_CYCLIC(a, b)) {    END_CYCLIC();