pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1331:   #define CHECK_FILE_ENTRY(PROG, POS, LEN, SHIFT) \    do { \    if (SHIFT < 0 || SHIFT > 2 || \    POS + (LEN << SHIFT) > PROG->linenumbers + PROG->num_linenumbers) \    Pike_fatal ("Invalid file entry in linenumber info.\n"); \    } while (0)   #else   #define CHECK_FILE_ENTRY(PROG, POS, LEN, SHIFT) do {} while (0)   #endif    - int get_small_number(char **q); + INT_TYPE get_small_number(char **q);      PMOD_EXPORT void do_free_program (struct program *p)   {    if (p)    free_program(p);   }      /* So what if we don't have templates? / Hubbe */      #ifdef PIKE_DEBUG
pike.git/src/program.c:2137:   #define ID fsort_program_identifier_index   #define TYPE unsigned short   #include "fsort_template.h"   #undef TYPE   #undef ID   #undef XARGS   #undef EXTRA_ARGS   #undef CMP      #ifdef PIKE_DEBUG - struct pike_string *find_program_name(struct program *p, INT32 *line) + struct pike_string *find_program_name(struct program *p, INT_TYPE *line)   { -  INT32 l; +  INT_TYPE l;    if(!line) line=&l;      #ifdef DEBUG_MALLOC    {    char *tmp=dmalloc_find_name(p);    if (tmp) {    char *p = STRCHR (tmp, ':');    if (p) {    char *pp;    while ((pp = STRCHR (p + 1, ':'))) p = pp;
pike.git/src/program.c:2495:    my_yyerror("Illegal to redefine final identifier %S", name);    }    }    }    }      #ifdef DEBUG_MALLOC    {   #define DBSTR(X) ((X)?(X)->str:"")    int e,v; -  INT32 line; +  INT_TYPE line;    struct pike_string *tmp;    struct memory_map *m=0;;    if(c->lex.current_file &&    c->lex.current_file->str &&    c->lex.current_file->len &&    !strcmp(c->lex.current_file->str,"-"))    {    m=dmalloc_alloc_mmap( DBSTR(c->lex.current_file), c->lex.current_line);    }    else if( (tmp=find_program_name(Pike_compiler->new_program, &line)) )
pike.git/src/program.c:2768:    debug_malloc_touch(Pike_compiler->fake_object->storage);       if(Pike_compiler->new_program->program)    {   #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \    Pike_compiler->malloc_size_program->PIKE_CONCAT(num_,NAME) = \    Pike_compiler->new_program->PIKE_CONCAT(num_,NAME);   #include "program_areas.h"       { -  INT32 line=0, off=0; +  INT_TYPE line = 0; +  INT32 off = 0;    size_t len = 0;    INT32 shift = 0;    char *file=0;    char *cnt=Pike_compiler->new_program->linenumbers;       while(cnt < Pike_compiler->new_program->linenumbers +    Pike_compiler->new_program->num_linenumbers)    {    if(*cnt == 127)    {
pike.git/src/program.c:2850:    Pike_compiler->num_parse_error=0;       push_compiler_frame(0);    copy_pike_type(Pike_compiler->compiler_frame->current_return_type,    void_type_string);       debug_malloc_touch(Pike_compiler->fake_object);    debug_malloc_touch(Pike_compiler->fake_object->storage);   }    - PMOD_EXPORT void debug_start_new_program(int line, const char *file) + PMOD_EXPORT void debug_start_new_program(INT_TYPE line, const char *file)   {    struct pike_string *save_file; -  int save_line; +  INT_TYPE save_line;    struct compilation *c;       CHECK_COMPILER();    c = THIS_COMPILATION;       save_file = dmalloc_touch(struct pike_string *, c->lex.current_file);    save_line = c->lex.current_line;       { /* Trim off the leading path of the compilation environment. */    const char *p = DEFINETOSTR(PIKE_SRC_ROOT), *f = file;    while (*p && *p == *f) p++, f++;    while (*f == '/' || *f == '\\') f++;       c->lex.current_file = make_shared_string(f);    c->lex.current_line = line;    }       CDFPRINTF((stderr, -  "th(%ld) start_new_program(%d, %s): " +  "th(%ld) start_new_program(%ld, %s): "    "threads_disabled:%d, compilation_depth:%d\n", -  (long)th_self(), line, file, +  (long)th_self(), (long)line, file,    threads_disabled, c->compilation_depth));       low_start_new_program(0,1,0,0,0);    store_linenumber(line,c->lex.current_file);    debug_malloc_name(Pike_compiler->new_program, file, line);       free_string(c->lex.current_file);    c->lex.current_file = dmalloc_touch(struct pike_string *, save_file);    c->lex.current_line = save_line;   }
pike.git/src/program.c:3203: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr,    "%*sReference table:\n"    "%*s ####: Flags Inherit Identifier\n",    indent, "", indent, "");    for (d=0; d < p->num_identifier_references; d++) {    struct reference *ref = p->identifier_references + d;    struct identifier *id = ID_FROM_PTR(p, ref);       fprintf(stderr,    "%*s %4d: %5x %7d %10d %s\n" -  "%*s %s:%d\n", +  "%*s %s:%ld\n",    indent, "",    d, ref->id_flags, ref->inherit_offset,    ref->identifier_offset,    id->name->size_shift ? "(wide)" : id->name->str,    indent, "", -  p->num_strings?p->strings[id->filename_strno]->str:"-", id->linenumber); +  p->num_strings?p->strings[id->filename_strno]->str:"-", +  (long)id->linenumber);    if (IDENTIFIER_IS_ALIAS(id->identifier_flags)) {    fprintf (stderr, "%*s Alias for %d:%d\n",    indent, "", id->func.ext_ref.depth, id->func.ext_ref.id);    } else if (IDENTIFIER_IS_CONSTANT(id->identifier_flags)) {    fprintf (stderr, "%*s Constant #%ld\n",    indent, "", (long)id->func.const_info.offset);    } else if (IDENTIFIER_IS_VARIABLE(id->identifier_flags)) {    fprintf (stderr, "%*s Offset: 0x%08lx\n",    indent, "", (long)id->func.offset);    } else if (IDENTIFIER_IS_PIKE_FUNCTION(id->identifier_flags)) { -  INT32 line; +  INT_TYPE line;    struct program *inh_p = INHERIT_FROM_PTR(p,ref)->prog;    struct pike_string *file =    get_line (ID_FROM_PTR(p,ref)->func.offset + inh_p->program, inh_p, &line);    if (!file->size_shift) -  fprintf (stderr, "%*s %s:%d\n", -  indent, "", file->str, line); +  fprintf (stderr, "%*s %s:%ld\n", +  indent, "", file->str, (long)line);    free_string (file);    } else {    fprintf (stderr, "%*s Cfun: %p\n",    indent, "", id->func.c_fun);    }    }       fprintf(stderr, "\n"    "%*sIdentifier index table:\n"    "%*s ####: Index\tName\n",
pike.git/src/program.c:3272: Inside #if defined(PIKE_DEBUG)
   }    fprintf(stderr, "\n"    "%*sIdentifier table:\n"    "%*s ####: Flags Offset Type Name\n",    indent, "", indent, "");    for (d=0; d < p->num_identifiers; d++) {    struct identifier *id = p->identifiers + d;       fprintf(stderr,    "%*s %4d: %5x %6"PRINTPTRDIFFT"d %4d \"%s\"\n" -  "%*s %s:%d\n", +  "%*s %s:%ld\n",    indent, "",    d, id->identifier_flags, id->func.offset,    id->run_time_type, id->name->str,    indent, "", -  p->num_strings?p->strings[id->filename_strno]->str:"-", id->linenumber); +  p->num_strings?p->strings[id->filename_strno]->str:"-", +  (long)id->linenumber);    }       fprintf(stderr, "\n"    "%*sVariable table:\n"    "%*s ####: Index\n",    indent, "", indent, "");    for (d = 0; d < p->num_variable_index; d++) {    fprintf(stderr, "%*s %4d: %5d\n",    indent, "",    d, p->variable_index[d]);
pike.git/src/program.c:3332:    if (p->lfuns[d] != -1) {    fprintf(stderr, "%*s %4d: %04d %s\n",    indent, "", d, p->lfuns[d], lfun_names[d]);    }    }       fprintf(stderr, "\n"    "%*sLinenumber table:\n",    indent, "");    { -  INT32 off = 0, line = 0; +  INT32 off = 0; +  INT_TYPE line = 0;    char *cnt = p->linenumbers;       while (cnt < p->linenumbers + p->num_linenumbers) {    if (*cnt == 127) {    int len, shift;    char *file;    cnt++;    len = get_small_number(&cnt);    shift = *cnt;    file = ++cnt;    CHECK_FILE_ENTRY (p, cnt, len, shift);    cnt += len << shift;    if (!shift) {    fprintf(stderr, "%*s Filename: \"%s\"\n", indent, "", file);    } else {    fprintf(stderr, "%*s Filename: len:%d, shift:%d\n", indent, "", len, shift);    }    }    off += get_small_number(&cnt);    line += get_small_number(&cnt); -  fprintf(stderr, "%*s %8d:%8d\n", indent, "", off, line); +  fprintf(stderr, "%*s %8d:%8ld\n", indent, "", off, (long)line);    }    }       fprintf(stderr, "\n");   }      void check_program(struct program *p)   {    unsigned INT32 e;    int variable_positions[1024];
pike.git/src/program.c:6733:    * closest previous line number entry. The first    * stored entry is absolute.    * 2. small number Line number. Stored in the same way as the pc.    *    * Small number:    * If -127 < n < 127:    * 1. char The number.    * Else if -32768 <= n < 32768:    * 1. char -127 (marker).    * 2. short The 16-bit signed number stored in big endian order. +  * Else if n < -0x80000000 or n > 0x7fffffff: +  * 1. char -127 (marker). +  * 2. short Zero (64-bit marker). +  * 3. INT_TYPE The 64-bit signed number stored in big endian order.    * Else:    * 1. char -128 (marker).    * 2. int The 32-bit signed number stored in big endian order.    *    * Whenever the filename changes, a filename entry followed by a line    * number entry is stored. If only the line number changes, a line    * number entry is stored. The first stored entry (at pc 0) is the    * file and line where the program is defined, if they are known. The    * definition line for a top level program is set to 0.    */    - int get_small_number(char **q) + INT_TYPE get_small_number(char **q)   {    /* This is a workaround for buggy cc & Tru64 */    unsigned char *addr = (unsigned char *)*q; -  int ret = *((signed char *)addr); +  INT_TYPE ret = *((signed char *)addr);    ret=*(signed char *)*q;    addr++;    switch(ret)    {    case -127:    ret = (((signed char *)addr)[0]<<8) | addr[1];    addr += 2; -  +  if (!ret) { +  /* 64-bit signed number. */ +  ret = *((signed char *)addr++); +  ret = (ret<<8) | *(addr++); +  ret = (ret<<8) | *(addr++); +  ret = (ret<<8) | *(addr++); +  ret = (ret<<8) | *(addr++); +  ret = (ret<<8) | *(addr++); +  ret = (ret<<8) | *(addr++); +  ret = (ret<<8) | *(addr++); +  }    break;       case -128:    ret = (((signed char *)addr)[0]<<24) | (addr[1]<<16) |    (addr[2]<<8) | addr[3];    addr += 4;    break;      #ifdef PIKE_DEBUG    case 127:
pike.git/src/program.c:6783:   void start_line_numbering(void)   {    if(Pike_compiler->last_file)    {    free_string(Pike_compiler->last_file);    Pike_compiler->last_file=0;    }    Pike_compiler->last_pc=Pike_compiler->last_line=0;   }    - static void insert_small_number(INT32 a) + static void insert_small_number(INT_TYPE a)   {   #ifdef PIKE_DEBUG -  int start = Pike_compiler->new_program->num_linenumbers; +  size_t start = Pike_compiler->new_program->num_linenumbers;   #endif /* PIKE_DEBUG */    if(a>-127 && a<127)    {    add_to_linenumbers(a);    }else if(a>=-32768 && a<32768){    add_to_linenumbers(-127);    add_to_linenumbers(a>>8);    add_to_linenumbers(a); -  + #ifdef INT_TYPE_INT32_CONVERSION +  } else if (a < -0x80000000L || a > 0x7fffffffL) { +  /* Overload 16-bit zero as marker for 64-bit. */ +  fprintf(stderr, "Saving huge linenumber: %lld\n", (long long)a); +  add_to_linenumbers(-127); +  add_to_linenumbers(0); +  add_to_linenumbers(0); +  add_to_linenumbers(a>>56); +  add_to_linenumbers(a>>48); +  add_to_linenumbers(a>>40); +  add_to_linenumbers(a>>32); +  add_to_linenumbers(a>>24); +  add_to_linenumbers(a>>16); +  add_to_linenumbers(a>>8); +  add_to_linenumbers(a); + #endif    }else{    add_to_linenumbers(-128);    add_to_linenumbers(a>>24);    add_to_linenumbers(a>>16);    add_to_linenumbers(a>>8);    add_to_linenumbers(a);    }   #ifdef PIKE_DEBUG    {    char *tmp = Pike_compiler->new_program->linenumbers + start; -  INT32 res = get_small_number(&tmp); +  INT_TYPE res = get_small_number(&tmp);    if (a != res) {    tmp = Pike_compiler->new_program->linenumbers + start;    fprintf(stderr, "0x%p: %02x %02x %02x %02x %02x\n",    tmp, (unsigned char) tmp[0], (unsigned char) tmp[1],    (unsigned char) tmp[2], (unsigned char) tmp[3], (unsigned char) tmp[4]); -  Pike_fatal("insert_small_number failed: %d (0x%08x) != %d (0x%08x)\n", -  a, a, res, res); +  if ((start + 5) < Pike_compiler->new_program->num_linenumbers) { +  /* 64-bit. Dump the remaining 6 bytes as well. */ +  fprintf(stderr, "0x%p: %02x %02x %02x %02x %02x %02x\n", +  tmp, (unsigned char) tmp[5], (unsigned char) tmp[6], +  (unsigned char) tmp[7], (unsigned char) tmp[8], +  (unsigned char) tmp[9], (unsigned char) tmp[10]);    } -  +  Pike_fatal("insert_small_number failed: %ld (0x%08lx) != %ld (0x%08lx)\n", +  (long)a, (long)a, (long)res, (long)res);    } -  +  }   #endif /* PIKE_DEBUG */   }    - static void ext_insert_small_number (char **ptr, INT32 a) + static void ext_insert_small_number (char **ptr, INT_TYPE a)   {    if(a>-127 && a<127)    {    *(*ptr)++ = a;    }else if(a>=-32768 && a<32768){    *(*ptr)++ = -127;    *(*ptr)++ = a>>8;    *(*ptr)++ = a; -  + #ifdef INT_TYPE_INT32_CONVERSION +  } else if (a < -0x80000000L || a > 0x7fffffffL) { +  /* Overload 16-bit zero as marker for 64-bit. */ +  *(*ptr)++ = -127; +  *(*ptr)++ = 0; +  *(*ptr)++ = 0; +  *(*ptr)++ = a>>56; +  *(*ptr)++ = a>>48; +  *(*ptr)++ = a>>40; +  *(*ptr)++ = a>>32; +  *(*ptr)++ = a>>24; +  *(*ptr)++ = a>>16; +  *(*ptr)++ = a>>8; +  *(*ptr)++ = a; + #endif    }else{    *(*ptr)++ = -128;    *(*ptr)++ = a>>24;    *(*ptr)++ = a>>16;    *(*ptr)++ = a>>8;    *(*ptr)++ = a;    }   }    - void ext_store_program_line (struct program *prog, INT32 line, struct pike_string *file) + void ext_store_program_line (struct program *prog, INT_TYPE line, struct pike_string *file)   {    char *ptr;      #ifdef PIKE_DEBUG    if (prog->linenumbers)    Pike_fatal ("Program already got linenumber info.\n");    if (Pike_compiler->new_program == prog)    Pike_fatal ("Use store_linenumber instead when the program is compiled.\n");   #endif    -  ptr = prog->linenumbers = xalloc (1 + 5 + 1 + (file->len << file->size_shift) + 5 + 5); -  *ptr++ = 127; -  ext_insert_small_number (&ptr, file->len); -  *ptr++ = (char) file->size_shift; -  MEMCPY (ptr, file->str, file->len << file->size_shift); +  ptr = prog->linenumbers = xalloc (1 + 5 + 1 + (file->len << file->size_shift) + 1 + 11); +  *ptr++ = 127; /* 1 */ +  ext_insert_small_number (&ptr, file->len); /* 5 */ +  *ptr++ = (char) file->size_shift; /* 1 */ +  MEMCPY (ptr, file->str, file->len << file->size_shift); /* - */    ptr += file->len << file->size_shift; -  *ptr++ = 0; /* PC */ -  ext_insert_small_number (&ptr, line); +  *ptr++ = 0; /* PC */ /* 1 */ +  ext_insert_small_number (&ptr, line); /* 11 */    prog->num_linenumbers = ptr - prog->linenumbers;   }    - void store_linenumber(INT32 current_line, struct pike_string *current_file) + void store_linenumber(INT_TYPE current_line, struct pike_string *current_file)   {   /* if(!store_linenumbers) Pike_fatal("Fnord.\n"); */   #ifdef PIKE_DEBUG    if(a_flag)    { -  INT32 line=0, off=0; +  INT_TYPE line=0; +  INT32 off=0;    size_t len = 0;    INT32 shift = 0;    char *file=0;    char *cnt=Pike_compiler->new_program->linenumbers;       if (a_flag > 50) { -  fprintf(stderr, "store_linenumber(%d, \"%s\") at pc %d\n", -  current_line, current_file->str, +  fprintf(stderr, "store_linenumber(%ld, \"%s\") at pc %d\n", +  (long)current_line, current_file->str,    (INT32) PIKE_PC); -  fprintf(stderr, " last_line:%d last_file:\"%s\"\n", -  Pike_compiler->last_line, +  fprintf(stderr, " last_line:%ld last_file:\"%s\"\n", +  (long)Pike_compiler->last_line,    Pike_compiler->last_file?Pike_compiler->last_file->str:"");    }       while(cnt < Pike_compiler->new_program->linenumbers +    Pike_compiler->new_program->num_linenumbers)    {    char *start = cnt;    if(*cnt == 127)    {    cnt++;
pike.git/src/program.c:6900: Inside #if defined(PIKE_DEBUG)
   cnt += len<<shift;    if (a_flag > 100) {    fprintf(stderr, "Filename entry:\n"    " len: %"PRINTSIZET"d, shift: %d\n",    len, shift);    }    }    off+=get_small_number(&cnt);    line+=get_small_number(&cnt);    if (a_flag > 100) { -  fprintf(stderr, " off: %d, line: %d\n" +  fprintf(stderr, " off: %d, line: %ld\n"    " raw: ", -  off, line); +  off, (long)line);    for (;start < cnt; start++) {    fprintf(stderr, "%02x ", *((unsigned char *)start));    }    fprintf(stderr, "\n");    }    }       if(Pike_compiler->last_line != line ||    Pike_compiler->last_pc != off ||    (Pike_compiler->last_file && file &&    MEMCMP(Pike_compiler->last_file->str, file, len<<shift)))    {    Pike_fatal("Line numbering out of whack\n" -  " (line : %d ?= %d)!\n" +  " (line : %ld ?= %ld)!\n"    " ( pc : %d ?= %d)!\n"    " (shift: %d ?= %d)!\n"    " (len : %"PRINTSIZET"d ?= %"PRINTSIZET"d)!\n"    " (file : %s ?= %s)!\n", -  Pike_compiler->last_line, line, +  (long)Pike_compiler->last_line, (long)line,    Pike_compiler->last_pc, off,    Pike_compiler->last_file?Pike_compiler->last_file->size_shift:0,    shift,    Pike_compiler->last_file?Pike_compiler->last_file->len:0, len,    Pike_compiler->last_file?Pike_compiler->last_file->str:"N/A",    file?file:"N/A");    }    }   #endif    if(Pike_compiler->last_line != current_line ||
pike.git/src/program.c:6976:    file = ++pos; \    CHECK_FILE_ENTRY (prog, pos, len, shift); \    pos += len<<shift; \    } \    get_small_number(&pos); /* Ignore the offset */ \    line = get_small_number(&pos); \    } \    } while (0)      PMOD_EXPORT struct pike_string *low_get_program_line (struct program *prog, -  INT32 *linep) +  INT_TYPE *linep)   {    *linep = 0;       if (prog->linenumbers) {    size_t len;    INT32 shift;    char *file;       FIND_PROGRAM_LINE (prog, file, len, shift, (*linep));   
pike.git/src/program.c:7068:      /* 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, INT32 *linep, + PMOD_EXPORT char *low_get_program_line_plain(struct program *prog, +  INT_TYPE *linep,    int malloced)   {    *linep = 0;       if (prog->linenumbers) {    char *file;    size_t len;    INT32 shift;    FIND_PROGRAM_LINE (prog, file, len, shift, (*linep));    if (file) return make_plain_file (file, len, shift, malloced);    }       return NULL;   }      /* 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. */   PMOD_EXPORT struct pike_string *get_program_line(struct program *prog, -  INT32 *linep) +  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;   }      PMOD_EXPORT struct pike_string *low_get_line (PIKE_OPCODE_T *pc, -  struct program *prog, INT32 *linep) +  struct program *prog, +  INT_TYPE *linep)   {    linep[0] = 0;       if (prog->program && prog->linenumbers) {    ptrdiff_t offset = pc - prog->program;    if ((offset < (ptrdiff_t)prog->num_program) && (offset >= 0)) {    static char *file = NULL;    static char *base, *cnt; -  static INT32 off,line,pid; +  static INT32 off,pid; +  static INT_TYPE line;    static size_t len;    static INT32 shift;       if(prog->linenumbers != base || prog->id != pid || offset < off)    {    base = cnt = prog->linenumbers;    off=line=0;    pid=prog->id;    file = 0;    }else{
pike.git/src/program.c:7161:    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. */   PMOD_EXPORT char *low_get_line_plain (PIKE_OPCODE_T *pc, struct program *prog, -  INT32 *linep, int malloced) +  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; -  INT32 off = 0, line = 0; +  INT32 off = 0; +  INT_TYPE line = 0;    char *file = NULL;    size_t len = 0;    INT32 shift = 0;       while(cnt < prog->linenumbers + prog->num_linenumbers)    {    if(*cnt == 127)    {    cnt++;    len = get_small_number(&cnt);
pike.git/src/program.c:7204:    }       return NULL;   }      #ifdef PIKE_DEBUG   /* Variants for convenient use from a debugger. */      void gdb_program_line (struct program *prog)   { -  INT32 line; +  INT_TYPE line;    char *file = low_get_program_line_plain (prog, &line, 0); -  fprintf (stderr, "%s:%d\n", file, line); +  fprintf (stderr, "%s:%ld\n", file, (long)line);   }      void gdb_get_line (PIKE_OPCODE_T *pc, struct program *prog)   { -  INT32 line; +  INT_TYPE line;    char *file = low_get_line_plain (pc, prog, &line, 0); -  fprintf (stderr, "%s:%d\n", file, line); +  fprintf (stderr, "%s:%ld\n", file, (long)line);   }      #endif      /*    * 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, INT32 *linep) +  struct program *prog, +  INT_TYPE *linep)   {    struct pike_string *res;       if (prog == 0) {    struct pike_string *unknown_program;    REF_MAKE_CONST_STRING(unknown_program, "Unknown program");    linep[0] = 0;    return unknown_program;    }       res = low_get_line(pc, prog, linep);    if (!res) {    struct pike_string *not_found;    REF_MAKE_CONST_STRING(not_found, "Line not found");    return not_found;    }    return res;   }      PMOD_EXPORT struct pike_string *low_get_function_line (struct object *o, -  int fun, INT32 *linep) +  int fun, +  INT_TYPE *linep)   {    if (o->prog) {    struct program *p;    struct identifier *id;    struct pike_string *ret;    while (1) {    struct external_variable_context loc;    struct reference *idref = o->prog->identifier_references + fun;    p = PROG_FROM_PTR(o->prog, idref);    id = p->identifiers + idref->identifier_offset;
pike.git/src/program.c:7285:    return NULL;   }      /* 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, INT32 *linep) +  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
pike.git/src/program.c:7310:    * 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    * by Pike-code, in which case it is a NO-OP.    */   PMOD_EXPORT void va_yyreport(int severity_level, -  struct pike_string *file, INT32 line, +  struct pike_string *file, INT_TYPE line,    struct pike_string *system, INT32 args,    const char *fmt, va_list vargs)   {    struct compilation *c = MAYBE_THIS_COMPILATION;    struct string_builder s;       if (!c) {    /* No compiler context. */    pop_n_elems(args);    return;
pike.git/src/program.c:7385:    push_string(finish_string_builder(&s));    }       safe_apply_current(PC_REPORT_FUN_NUM, args + 5);    pop_stack();    if (args) pop_n_elems(args);    STACK_LEVEL_DONE(0);   }      PMOD_EXPORT void low_yyreport(int severity_level, -  struct pike_string *file, INT32 line, +  struct pike_string *file, INT_TYPE line,    struct pike_string *system,    INT32 args, const char *fmt, ...)   {    va_list vargs;       va_start(vargs,fmt);    va_yyreport(severity_level, file, line, system, args, fmt, vargs);    va_end(vargs);   }   
pike.git/src/program.c:7442:    * 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.    */   void yytype_report(int severity_level, -  struct pike_string *expected_file, INT32 expected_line, +  struct pike_string *expected_file, INT_TYPE expected_line,    struct pike_type *expected_t, -  struct pike_string *got_file, INT32 got_line, +  struct pike_string *got_file, INT_TYPE got_line,    struct pike_type *got_t,    INT32 args, const char *fmt, ...)   {    if (fmt)    {    va_list vargs;    va_start(vargs, fmt);    va_yyreport(severity_level, got_file, got_line, type_check_system_string,    args, fmt, vargs);    va_end(vargs);
pike.git/src/program.c:7917:    args++;    } else {    APPLY_MASTER("compile_warning", 3);    args++;    }    } else {    /* We hope that errors from compiling the master    * won't contain wide-strings... */    if (level >= REPORT_ERROR) {    fprintf(stderr, "%s:%ld: %s\n", -  filename->str, linenumber, message->str); +  filename->str, (long)linenumber, message->str);    } else {    fprintf(stderr, "%s:%ld: Warning: %s\n", -  filename->str, linenumber, message->str); +  filename->str, (long)linenumber, message->str);    }    fflush(stderr);    }    }    pop_n_elems(args);    push_int(0);   }      /*! @endclass    */
pike.git/src/program.c:9543:    new_frame->mark_sp_base = Pike_mark_sp;    new_frame->args = 0;    new_frame->num_locals = 0;    new_frame->pc = 0;    new_frame->return_addr = 0;    new_frame->scope = 0;    new_frame->save_sp = Pike_sp;    Pike_fp = new_frame;   }    - PMOD_EXPORT void enter_compiler(struct pike_string *filename, int linenumber) + PMOD_EXPORT void enter_compiler(struct pike_string *filename, +  INT_TYPE linenumber)   {    struct object *ce = parent_clone_object(compilation_program,    compilation_environment,    CE_PIKE_COMPILER_FUN_NUM, 0);    struct compilation *c;       low_enter_compiler(ce, 0);       c = THIS_COMPILATION;    if (filename) {
pike.git/src/program.c:11152:    return is_compatible_cache[hval].ret;   }      /* 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; -  INT32 a_line = 0; -  INT32 b_line = 0; +  INT_TYPE a_line = 0; +  INT_TYPE b_line = 0;    struct pike_string *a_file;    struct pike_string *b_file;    DECLARE_CYCLIC();       /* Optimize the loop somewhat */    if (a->num_identifier_references < b->num_identifier_references) {    struct program *tmp = a;    a = b;    b = tmp;    }
pike.git/src/program.c:11194:    if(s == bid->name) continue; /* Skip __INIT */    i = find_shared_string_identifier(bid->name,a);    if (i == -1) {    continue; /* It's ok... */    }       /* Note: Uses weaker check for constant integers. */    if(((bid->run_time_type != PIKE_T_INT) ||    (ID_FROM_INT(a, i)->run_time_type != PIKE_T_INT)) &&    !match_types(ID_FROM_INT(a,i)->type, bid->type)) { -  INT32 aid_line = a_line; -  INT32 bid_line = b_line; +  INT_TYPE aid_line = a_line; +  INT_TYPE bid_line = b_line;    struct pike_string *aid_file = get_identifier_line(a, i, &aid_line);    struct pike_string *bid_file = get_identifier_line(b, e, &bid_line);    if (!aid_file) aid_file = a_file;    if (!bid_file) bid_file = b_file;    ref_push_string(bid->name);    ref_push_program(a);    ref_push_program(b);    yytype_report(severity_level,    aid_file, aid_line, ID_FROM_INT(a, i)->type,    bid_file, bid_line, bid->type, 3,
pike.git/src/program.c:11221:    END_CYCLIC();    return;   }      /* 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"); -  INT32 a_line = 0; -  INT32 b_line = 0; +  INT_TYPE a_line = 0; +  INT_TYPE b_line = 0;    struct pike_string *a_file;    struct pike_string *b_file;    DECLARE_CYCLIC();       if (BEGIN_CYCLIC(a, b)) {    END_CYCLIC();    return;    }    SET_CYCLIC_RET(1);   
pike.git/src/program.c:11246:    for(e=0;e<b->num_identifier_references;e++)    {    struct identifier *bid;    int i;    if (b->identifier_references[e].id_flags & (ID_PROTECTED|ID_HIDDEN))    continue; /* Skip protected & hidden */    bid = ID_FROM_INT(b,e);    if(s == bid->name) continue; /* Skip __INIT */    i = find_shared_string_identifier(bid->name,a);    if (i == -1) { -  INT32 bid_line = b_line; +  INT_TYPE bid_line = b_line;    struct pike_string *bid_file;    if (b->identifier_references[e].id_flags & (ID_OPTIONAL))    continue; /* It's ok... */    bid_file = get_identifier_line(b, e, &bid_line);    if (!bid_file) bid_file = b_file;    yytype_report(severity_level,    bid_file, bid_line, bid->type,    a_file, a_line, NULL,    0, "Missing identifier %S.", bid->name);    continue;    }       if (!pike_types_le(bid->type, ID_FROM_INT(a, i)->type)) { -  INT32 aid_line = a_line; -  INT32 bid_line = b_line; +  INT_TYPE aid_line = a_line; +  INT_TYPE bid_line = b_line;    struct pike_string *aid_file = get_identifier_line(a, i, &aid_line);    struct pike_string *bid_file = get_identifier_line(b, e, &bid_line);    if (!aid_file) aid_file = a_file;    if (!bid_file) bid_file = b_file;    if(!match_types(ID_FROM_INT(a,i)->type, bid->type)) {    yytype_report(severity_level,    bid_file, bid_line, bid->type,    aid_file, aid_line, ID_FROM_INT(a, i)->type,    0, "Type of identifier %S does not match.", bid->name);    } else {