>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:

  DS>   dprinterr [PISN]x - Like printerr, but only when running in debug mode
  DS>   ifdebug label - If debug's on, branch to label
  DS>   unlessdebug label - branch to label unless debugging's on
  DS>   debugbsr label - do a bsr to the label if debugging's on

  DS> As well as making the current debug status part of the interpreter
  DS> info section which can be queried and branched on as needed. I can
  DS> certainly see skipping the if/unlessdebug stuff, though the print
  DS> only if debugging would make the code a lot cleaner, such as it
  DS> is. (I'm also thinking that a conditional bsr would be useful, but
  DS> I'm not sure it'd be useful *enough*) If it'd make the JIT unhappy
  DS> to have more branching ops they can be left out.

some random comments:

it looks like you have only one debug flag/level. would multiple
flags/levels be useful or hard to add? it would mean adding another arg
to the debug ops. if given no arg, it would default to level 1/flag 1 or
something like that.

what about a compile time (byte code generation? JIT?) option to
optimize out debug code so it doesn't even get run if not enabled? 

do we need JIT support for debugging? you can debug in bytecode and then
JIT for speed. this assumes, of course, that the JITing is correct.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to