pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1555:    */      struct program *first_program = 0;   static int current_program_id = PROG_DYNAMIC_ID_START;      struct program *gc_internal_program = 0;   static struct program *gc_mark_program_pos = 0;      #define CHECK_FILE_ENTRY(PROG, STRNO) \    do { \ -  if ((STRNO < 0) || (STRNO >= PROG->num_strings)) \ +  if ((STRNO >= PROG->num_strings)) \    Pike_fatal ("Invalid file entry in linenumber info.\n"); \    } while (0)      INT_TYPE get_small_number(char **q);      PMOD_EXPORT void do_free_program (struct program *p)   {    if (p)    free_program(p);   }
pike.git/src/program.c:7771:    if( str->refs > 1 )    for (i=0;i<Pike_compiler->new_program->num_strings;i++)    if (Pike_compiler->new_program->strings[i] == str)    return i;       reference_shared_string(str);    add_to_strings(str);    return Pike_compiler->new_program->num_strings-1;   }    - /* NOTE: O()! */ + /* NOTE: O(n�)! */   int store_constant(const struct svalue *foo,    int equal,    struct pike_string *UNUSED(constant_name))   {    struct program_constant tmp;    volatile unsigned int e;       JMP_BUF jmp;    if (SETJMP(jmp)) {    handle_compile_exception ("Error comparing constants.");
pike.git/src/program.c:8655:    while(cnt < prog->linenumbers + prog->num_linenumbers)    {    //printf("cnt: %d\n", *cnt);    if(*cnt == 127)    {    int strno;    cnt++;    //printf("new file\n");    strno = get_small_number(&cnt);    CHECK_FILE_ENTRY (prog, strno); +  if(strno < 0) { +  cnt++; +  get_small_number(&cnt); +  continue; // variable entry +  }    file = prog->strings[strno];    if(file == fname) {    //printf("Right file, right time\n");    wanted_file = 1;    }    else {    wanted_file = 0;    }    printf("file: %s\n", file->str);    continue;