Branch: Tag:

2020-09-09

2020-09-09 14:43:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Enable TYPE_STACK_DEBUG with l_flag.

92:   static int implements_mode;      #ifdef PIKE_DEBUG - void TYPE_STACK_DEBUG(const char *UNUSED(fun)) + void TYPE_STACK_DEBUG(const char *fun)   { - #if 0 -  fprintf(stderr, "%25s(): stack_depth:%ld mark_stack_depth:%ld\n", +  if (l_flag > 2) { +  fprintf(stderr, "%25s(): stack_depth:%-3ld mark_stack_depth:%ld\n",    fun, (long)(Pike_compiler->type_stackp - type_stack), -  (long)(Pike_compiler->pike_type_mark_stackp - pike_type_mark_stack)); - #endif /* 0 */ +  (long)(Pike_compiler->pike_type_mark_stackp - +  pike_type_mark_stack)); +  if (Pike_compiler->type_stackp != type_stack) { +  fprintf(stderr, "%25s : top: ", ""); +  simple_describe_type(peek_type_stack()); +  fprintf(stderr, "\n");    } -  +  } + }   #endif /* PIKE_DEBUG */      static void clear_markers(void)