Clean up debug dump code.

This commit is contained in:
Bob Nystrom
2015-03-15 10:09:43 -07:00
parent 1616df63d2
commit 287c611260
5 changed files with 97 additions and 82 deletions
+6 -6
View File
@@ -584,12 +584,12 @@ static bool runInterpreter(WrenVM* vm)
#if WREN_DEBUG_TRACE_INSTRUCTIONS
// Prints the stack and instruction before each instruction is executed.
#define DEBUG_TRACE_INSTRUCTIONS() \
do \
{ \
wrenDebugPrintStack(fiber); \
wrenDebugPrintInstruction(vm, fn, (int)(ip - fn->bytecode)); \
} \
#define DEBUG_TRACE_INSTRUCTIONS() \
do \
{ \
wrenDumpStack(fiber); \
wrenDumpInstruction(vm, fn, (int)(ip - fn->bytecode)); \
} \
while (false)
#else
#define DEBUG_TRACE_INSTRUCTIONS() do { } while (false)