Branch: Tag:

2016-08-07

2016-08-07 14:41:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Debug [MasterObject]: The debug flags should now work again.

The efuns _compiler_trace(), _assembler_debug() and _optimizer_debug()
are no more, so use the corresponding public API instead.

Makes the flags --compiler_trace, --assembler-debug and
--optimizer_debug work again.

3315:    debug+=(int)q[i][1];    break;    - #if constant(_compiler_trace) -  case "compiler_trace": -  _compiler_trace(1); -  break; - #endif /* constant(_compiler_trace) */ -  - #if constant(_assembler_debug) -  case "assembler_debug": -  _assembler_debug((int)q[i][1]); -  break; - #endif /* constant(_assembler_debug) */ -  - #if constant(_optimizer_debug) -  case "optimizer_debug": -  _optimizer_debug((int)q[i][1]); -  break; - #endif /* constant(_optimizer_debug) */ -  +     case "trace":    trace+=(int)q[i][1];    break;
3493:    main_resolv( "Gmp.bignum" );    write(cpp(master_read_file(opts[1]),opts[1]));    exit(0); +  +  case "compiler_trace": +  function(int:void) compiler_trace = +  main_resolv("Debug.compiler_trace"); +  if (compiler_trace) { +  compiler_trace(1);    } -  +  break; +  +  case "assembler_debug": +  function(int:void) assembler_debug = +  main_resolv("Debug.assembler_debug"); +  if (assembler_debug) { +  assembler_debug((int)opts[1]);    } -  +  break;    -  +  case "optimizer_debug": +  function(int:void) optimizer_debug = +  main_resolv("Debug.optimizer_debug"); +  if (optimizer_debug) { +  optimizer_debug((int)opts[1]); +  } +  break; +  } +  } +     argv = tmp->get_args(argv,1);    }    else