Branch: Tag:

2014-08-31

2014-08-31 10:57:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Debug: Changed trace flag for check_call_svalue().

This moves tracing of check_call_svalue() from using l_flag (aka
optimizer_debug()) to using trace_level (aka predef::trace()).

The rationale for this is that check_call_svalue() is used by the
runtime (via the variant dispatcher), and not by the compiler.

Tracing of check_call_svalue() is (as before) enabled at level 3.

6332:    struct pike_type *tmp;    struct pike_type *tmp2;    INT32 array_cnt = 0; -  int indent = 2; +       #ifdef PIKE_DEBUG -  if (l_flag>2) { -  fprintf(stderr, "%*scheck_call_svalue(", indent*2, ""); +  if (Pike_interpreter.trace_level > 2) { +  fprintf(stderr, " check_call_svalue(");    simple_describe_type(fun_type); -  fprintf(stderr, ", 0x%08x, %p)...\n", flags, sval); +  fprintf(stderr, ", 0x%08x, ", flags); +  debug_describe_svalue(sval); +  fprintf(stderr, ")...\n");    }   #endif /* PIKE_DEBUG */   
6480:       if (!array_cnt || !res) {   #ifdef PIKE_DEBUG -  if (l_flag>2) { +  if (Pike_interpreter.trace_level > 2) {    if (res) { -  fprintf(stderr, "%*s==> ", indent*2, ""); +  fprintf(stderr, " ==> ");    simple_describe_type(res);    } else { -  fprintf(stderr, "%*s==> NULL", indent*2, ""); +  fprintf(stderr, " ==> NULL");    }    fprintf(stderr, "\n");    }
6502:    res = pop_type();      #ifdef PIKE_DEBUG -  if (l_flag>2) { -  fprintf(stderr, "%*s==> ", indent*2, ""); +  if (Pike_interpreter.trace_level > 2) { +  fprintf(stderr, " ==> ");    simple_describe_type(res);    fprintf(stderr, "\n");    }