added caml_bcodcount for traced DEBUG

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6255 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Basile Starynkevitch 2004-04-26 07:59:23 +00:00
parent 8db9132e84
commit d2441b0b7f
1 changed files with 7 additions and 0 deletions

View File

@ -183,6 +183,11 @@ extern long caml_safe_div(long p, long q);
extern long caml_safe_mod(long p, long q);
#endif
#ifdef DEBUG
static long caml_bcodcount;
#endif
/* The interpreter itself */
value caml_interprete(code_t prog, asize_t prog_size)
@ -266,7 +271,9 @@ value caml_interprete(code_t prog, asize_t prog_size)
#else
while(1) {
#ifdef DEBUG
caml_bcodcount++;
if (caml_icount-- == 0) caml_stop_here ();
if (caml_trace_flag>1) printf("\n##%ld\n", caml_bcodcount);
if (caml_trace_flag) caml_disasm_instr(pc);
if (caml_trace_flag>1) {
printf("env=");