Switch from JSON.stringify for debug output to sys.inspect which doesn't bail out on circular references

Sat, 22 May 2010 17:37:02 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 22 May 2010 17:37:02 +0100
changeset 21
9b5cc503bc31
parent 20
977ae93f612c
child 22
8391b51517df

Switch from JSON.stringify for debug output to sys.inspect which doesn't bail out on circular references

lvm.js file | annotate | diff | comparison | revisions
--- a/lvm.js	Sat May 22 17:33:43 2010 +0100
+++ b/lvm.js	Sat May 22 17:37:02 2010 +0100
@@ -262,7 +262,7 @@
 			if(debugMode)
 			{
 				sys.puts("PC: "+(this.frame.pc-1)+" OP: "+instruction[0]);
-				sys.puts("STACK: "+JSON.stringify(this.frame.reg));
+				sys.puts("STACK: "+sys.inspect(this.frame.reg));
 			}
 			switch(INS_OPCODE(instruction))
 			{

mercurial