As I've been writing library code in pir, I'm finding I've got a *lot* of commented-out printerr sections, as well as a fair amount of intermediate code to generate the data to be printed. What would be useful would be a relatively fast and simple way to leave these in and just skip over them, or have them not execute. As such I'm thinking we could use:
dprinterr [PISN]x - Like printerr, but only when running in debug mode ifdebug label - If debug's on, branch to label unlessdebug label - branch to label unless debugging's on debugbsr label - do a bsr to the label if debugging's on
As well as making the current debug status part of the interpreter info section which can be queried and branched on as needed. I can certainly see skipping the if/unlessdebug stuff, though the print only if debugging would make the code a lot cleaner, such as it is. (I'm also thinking that a conditional bsr would be useful, but I'm not sure it'd be useful *enough*) If it'd make the JIT unhappy to have more branching ops they can be left out.
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk