pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:8394:
PMOD_EXPORT struct pike_string *low_get_line (PIKE_OPCODE_T *pc, 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 struct pike_string *file = NULL;
+
static struct pike_string *next_file = NULL;
static char *base, *cnt; static ptrdiff_t off; static INT32 pid; static INT_TYPE line; if(prog->linenumbers == base && prog->id == pid && offset > off && cnt < prog->linenumbers + prog->num_linenumbers) goto fromold; base = cnt = prog->linenumbers;
pike.git/src/program.c:8416:
file = 0; while(cnt < prog->linenumbers + prog->num_linenumbers) { if(*cnt == 127) { int strno; cnt++; strno = get_small_number(&cnt); CHECK_FILE_ENTRY (prog, strno);
-
file = prog->strings[strno];
+
next_
file = prog->strings[strno];
continue; } off+=get_small_number(&cnt); fromold: if(off > offset) break; line+=get_small_number(&cnt);
-
+
file = next_file;
} if (cnt >= prog->linenumbers + prog->num_linenumbers) { /* We reached the end of the table. Make sure * we get in sync again next time we're called. */ base = NULL; } linep[0]=line; if (file) { add_ref(file);