Branch: Tag:

2012-01-12

2012-01-12 14:49:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: The compiler and runtime are now INT_TYPE-clean wrt line numbers.

1039:    va_end (args);   }    - static void dloc_gc_fatal (const char *file, int line, + static void dloc_gc_fatal (const char *file, INT_TYPE line,    void *a, int flags, const char *fmt, ...)   {    va_list args; -  fprintf (stderr, "%s:%d: GC fatal:\n", file, line); +  fprintf (stderr, "%s:%ld: GC fatal:\n", file, (long)line);    va_start (args, fmt);    debug_gc_fatal_va (a, PIKE_T_UNKNOWN, flags, fmt, args);    va_end (args);
1052:   static void rec_stack_fatal (struct gc_rec_frame *err, const char *err_name,    struct gc_rec_frame *p1, const char *p1n,    struct gc_rec_frame *p2, const char *p2n, -  const char *file, int line, +  const char *file, INT_TYPE line,    const char *fmt, ...)   {    va_list args;
1179: Inside #if defined(PIKE_DEBUG)
   struct object *o = t->frame->current_object;    struct program *p = o->prog;    struct identifier *id; -  INT32 line; +  INT_TYPE line;    struct pike_string *file;       fprintf (stderr, "%*s**The object is a trampoline.\n", indent, "");
1306: Inside #if defined(PIKE_DEBUG)
   case T_PROGRAM:    {    char *tmp; -  INT32 line; +  INT_TYPE line;    ptrdiff_t id_idx, id_count = 0;    struct inherit *inh = p->inherits, *next_inh = p->inherits + 1;    ptrdiff_t inh_id_end = p->num_identifier_references;
1555:    struct program *p = f->current_object->prog;    if (p) {    struct identifier *id = ID_FROM_INT(p, f->fun); -  INT32 line; +  INT_TYPE line;    struct pike_string *file;    if (IDENTIFIER_IS_PIKE_FUNCTION(id->identifier_flags) &&    id->func.offset >= 0 &&
2045: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    - PMOD_EXPORT void gc_check_zapped (void *a, TYPE_T type, const char *file, int line) + PMOD_EXPORT void gc_check_zapped (void *a, TYPE_T type, const char *file, INT_TYPE line)   {    struct marker *m = find_marker (a);    if (m && (m->flags & GC_CLEANUP_LEAKED)) -  fprintf (stderr, "Free of leaked %s %p from %s:%d, %d refs remaining\n", -  get_name_of_type (type), a, file, line, *(INT32 *)a - 1); +  fprintf (stderr, "Free of leaked %s %p from %s:%ld, %d refs remaining\n", +  get_name_of_type (type), a, file, (long)line, *(INT32 *)a - 1);   }      /* This function marks some known externals. The rest are handled by
2255:   static void check_rec_stack_frame (struct gc_rec_frame *f,    struct gc_rec_frame *p1, const char *p1n,    struct gc_rec_frame *p2, const char *p2n, -  const char *file, int line) +  const char *file, INT_TYPE line)   {    /* To allow this function to be used after a stack rotation but    * before cycle_id markup, there are no checks here for cycle_id
2302:    while (0)      static void check_cycle_piece_frame (struct gc_rec_frame *f, -  const char *file, int line) +  const char *file, INT_TYPE line)   {    LOW_CHECK_REC_FRAME (f, file, line);    if ((f->rf_flags & (GC_ON_CYCLE_PIECE_LIST|GC_ON_KILL_LIST)) !=
2318:    do check_cycle_piece_frame ((f), __FILE__, __LINE__); while (0)      static void check_kill_list_frame (struct gc_rec_frame *f, -  const char *file, int line) +  const char *file, INT_TYPE line)   {    LOW_CHECK_REC_FRAME (f, file, line);    if ((f->rf_flags & (GC_ON_CYCLE_PIECE_LIST|GC_ON_KILL_LIST)) !=
3815:    GC_VERBOSE_DO(    fprintf(stderr, "| Killing %p with %d refs", o, o->refs);    if (o->prog) { -  INT32 line; +  INT_TYPE line;    struct pike_string *file = get_program_line (o->prog, &line);    fprintf(stderr, ", prog %s:%d\n", file->str, line);    free_string(file);
4805:       if (TYPEOF(val) != T_INT) {    int i = find_shared_string_identifier (pike_cycle_depth_str.u.string, p); -  INT32 line; +  INT_TYPE line;    struct pike_string *file = get_identifier_line (p, i, &line); -  make_error ("Object got non-integer pike_cycle_depth %O at %S:%d.\n", -  &val, file, line); +  make_error ("Object got non-integer pike_cycle_depth %O at %S:%ld.\n", +  &val, file, (long)line);    free_svalue (&val);    free_svalue (&throw_value);    move_svalue (&throw_value, --Pike_sp);
4823:       if (val.u.integer < 0) {    int i = find_shared_string_identifier (pike_cycle_depth_str.u.string, p); -  INT32 line; +  INT_TYPE line;    struct pike_string *file = get_identifier_line (p, i, &line); -  make_error ("Object got negative pike_cycle_depth at %S:%d.\n", -  &val, file, line); +  make_error ("Object got negative pike_cycle_depth at %S:%ld.\n", +  &val, file, (long)line);    free_svalue (&throw_value);    move_svalue (&throw_value, --Pike_sp);    return -1;