pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:8177:      /* program.linenumbers format:    *    * Filename entry:    * 1. char 127 (marker).    * 2. small number Filename entry number in string table.    *    * Frame variable:    * 1. char 127 (marker).    * 2. small number ~(frame stack offset). -  * 3. char 0: name, 1: type -  * 4. small number name: strings_offset, type: constants_offset +  * 3. char -1: end, 0: name, 1: type (kind) +  * 4. small number end: -, name: strings_offset, type: constants_offset    *    * Line number entry:    * 1. small number Index in program.program (pc).    * Stored as the difference from the pc in the    * 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:
pike.git/src/program.c:8467:   }      void store_linenumber_frame_type(int frame_offset, int constant_num)   {    add_to_linenumbers(127);    insert_small_number(~frame_offset);    add_to_linenumbers(1);    insert_small_number(constant_num);   }    + void store_linenumber_frame_end(int frame_offset) + { +  add_to_linenumbers(127); +  insert_small_number(~frame_offset); +  add_to_linenumbers(-1); + } +    #define FIND_PROGRAM_LINE(prog, file, line) do { \    char *pos = prog->linenumbers; \    file = NULL; \    \    if (pos < prog->linenumbers + prog->num_linenumbers) { \    if (*pos == 127) { \    int strno; \    pos++; \    strno = get_small_number(&pos); \    CHECK_FILE_ENTRY (prog, strno); \
pike.git/src/program.c:8660:    if(*cnt == 127)    {    int strno;    cnt++;    strno = get_small_number(&cnt);    if (strno >= 0) {    CHECK_FILE_ENTRY (prog, strno);    next_file = prog->strings[strno];    } else {    int frame_offset = ~strno; -  int kind = *cnt++; +  int kind = *((signed char *)cnt++); +  if (kind >= 0) {    strno = get_small_number(&cnt); -  +  }    frame.num_local = frame_offset+1;    if (frame_offset < MAX_LOCAL) {    switch(kind) { -  +  case -1: /* end */ +  frame.num_local = frame_offset; +  break;    case 0: /* name */    frame.names[frame_offset] = strno;    break;    case 1: /* type */    frame.types[frame_offset] = strno;    break;   #ifdef PIKE_DEBUG    default:    Pike_fatal("Unknown linenumber entry: %d\n", kind);    break;