pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:86:      static void low_enter_compiler(struct object *ce, int inherit);   static void exit_program_struct(struct program *);   static size_t add_xstorage(size_t size,    size_t alignment,    ptrdiff_t modulo_orig);      static struct block_allocator program_allocator = BA_INIT_PAGES(sizeof(struct program), 4);      ATTRIBUTE((malloc)) - struct program * alloc_program() { + struct program * alloc_program(void) {    return ba_alloc(&program_allocator);   }      void really_free_program(struct program * p) {    exit_program_struct(p);    ba_free(&program_allocator, p);   }      void count_memory_in_programs(size_t *num, size_t *_size) {    size_t size;    struct program *p;    ba_count_all(&program_allocator, num, &size);    for(p=first_program;p;p=p->next) {    size+=p->total_size - sizeof (struct program);    }    *_size = size;   }    - void free_all_program_blocks() { + void free_all_program_blocks(void) {    ba_destroy(&program_allocator);   }      /* #define COMPILER_DEBUG */   /* #define PROGRAM_BUILD_DEBUG */      #ifdef COMPILER_DEBUG   #define CDFPRINTF(X) fprintf X   #ifndef PIKE_THREADS   /* The CDFPRINTF lines wants to print lock_depth, so fake one of those */
pike.git/src/program.c:3920:    "Program->identifier_index[%ld]\n",    (long)(e-1), (long)e);    }    }      }   #endif      static void f_dispatch_variant(INT32 args);    + int low_is_variant_dispatcher(struct identifier *id) + { +  if (!id) return 0; +  return (IDENTIFIER_IS_C_FUNCTION(id->identifier_flags) && +  !IDENTIFIER_IS_ALIAS(id->identifier_flags) && +  (id->func.c_fun == f_dispatch_variant)); + } +    int is_variant_dispatcher(struct program *prog, int fun)   {    struct reference *ref;    struct identifier *id;    if (fun < 0) return 0;    ref = PTR_FROM_INT(prog, fun);    id = ID_FROM_PTR(prog, ref); -  return (IDENTIFIER_IS_C_FUNCTION(id->identifier_flags) && -  !IDENTIFIER_IS_ALIAS(id->identifier_flags) && -  (id->func.c_fun == f_dispatch_variant)); +  return low_is_variant_dispatcher(id);   }      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);
pike.git/src/program.c:8462:    *! @constant NOTICE    *! @constant WARNING    *! @constant ERROR    *! @constant FATAL    *!    *! @seealso    *! @[report()]    */      /*! @decl void report(SeverityLevel severity, @ -  *! string filename, int linenumber, @ +  *! string filename, int(1..) linenumber, @    *! string subsystem, @    *! string message, mixed ... extra_args)    *!    *! Report a diagnostic from the compiler.    *!    *! @param severity    *! The severity of the diagnostic.    *!    *! @param filename    *! @param linenumber
pike.git/src/program.c:8534:    if (fun >= 0) {    apply_low(master_ob, fun, args);    return;    }    }       if (args > 5) {    f_sprintf(args - 4);    args = 5;    } -  get_all_args("report", args, "%d%W%i%W%W", +  get_all_args("report", args, "%d%W%+%W%W",    &level, &filename, &linenumber, &subsystem, &message);       /* Ignore informational level messages */    if (level >= REPORT_WARNING) {    if (master_ob && master_ob->prog) {    ref_push_string(filename);    push_int(linenumber);    ref_push_string(message);    if (level >= REPORT_ERROR) {    APPLY_MASTER("compile_error", 3);
pike.git/src/program.c:9428:    apply_external(1, CE_REPORT_FUN_NUM, args);    return;       apply_handler:    /* Ignore informational level messages */    if (level < REPORT_WARNING) return;    if (args > 5) {    f_sprintf(args - 4);    args = 5;    } -  get_all_args("report", args, "%d%W%i%W%W", +  get_all_args("report", args, "%d%W%+%W%W",    &level, &filename, &linenumber,    &subsystem, &message);       ref_push_string(filename);    push_int(linenumber);    ref_push_string(message);    apply_low(handler, fun, 3);    stack_pop_n_elems_keep_top(args);   }