[Nickle] nickle: Branch 'master'

Keith Packard keithp at keithp.com
Sun Feb 26 18:14:20 PST 2012


 file.c  |   12 ++++++++++++
 sched.c |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 22f9d58233450a4e6ff67abbaf8e4008e4f3998d
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Feb 27 15:06:05 2012 +1300

    Shorten backtrace display
    
    Don't display composite values in backtraces so that the
    backtrace doesn't get flooded with giant values.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/file.c b/file.c
index daa78f6..57e107d 100644
--- a/file.c
+++ b/file.c
@@ -1807,6 +1807,18 @@ FileVPrintf (Value file, char *fmt, va_list args)
 		else
 		    Print (file, v, *fmt, 0, 0, DEFAULT_OUTPUT_PRECISION, ' ');
 		break;
+	    case 'G':
+		v = va_arg (args, Value);
+		if (!v)
+		    (void) FilePuts (file, "<uninit>");
+		else {
+		    if (ValueRep(v) <= rep_void) {
+			Print (file, v, 'g', 0, 0, DEFAULT_OUTPUT_PRECISION, ' ');
+		    } else {
+			(void) FilePuts (file, "<composite>");
+		    }
+		}
+		break;
 	    case 'n':
 		FilePuts (file, NaturalSprint (0, va_arg (args, Natural *), 10, 0));
 		break;
diff --git a/sched.c b/sched.c
index ffa9d6a..9d4722d 100644
--- a/sched.c
+++ b/sched.c
@@ -310,7 +310,7 @@ TraceFunction (Value file, FramePtr frame, CodePtr code, ExprPtr name)
     {
 	if (fe)
 	    FilePuts (file, ", ");
-	FilePrintf (file, "%g", BoxValue (frame->frame, fe));
+	FilePrintf (file, "%G", BoxValue (frame->frame, fe));
     }
     FilePuts (file, ")\n");
 }


More information about the Nickle mailing list