From ce7ae6fa75e33b4e484ba7b4e0d79ec2b9d424fd Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Thu, 19 Sep 2002 17:26:53 +0000 Subject: [PATCH] 0.7.7.32: added test case for can't-run-saved-.core bug --- NEWS | 4 ++-- src/code/defboot.lisp | 30 +++++++++++++++--------------- tests/core.test.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ tests/run-tests.sh | 8 +++++++- version.lisp-expr | 2 +- 5 files changed, 68 insertions(+), 19 deletions(-) create mode 100644 tests/core.test.sh diff --git a/NEWS b/NEWS index 254f4f5..d05cd03 100644 --- a/NEWS +++ b/NEWS @@ -1273,8 +1273,8 @@ changes in sbcl-0.7.8 relative to sbcl-0.7.7: * fixed bug in compilation of functions as first class values (thanks to Antonio Martinez-Shotton) * The compiler's handling TYPE-ERRORs which it can prove will - inevitably happen at runtime has been cleaned up and corrected. - (thanks to Alexey Dejneka) + inevitably happen at runtime has been cleaned up and corrected + in several ways. (thanks to Alexey Dejneka) planned incompatible changes in 0.7.x: * When the profiling interface settles down, maybe in 0.7.x, maybe diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index 53e1742..d9afbde 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -72,21 +72,21 @@ ;;; COND defined in terms of IF (defmacro-mundanely cond (&rest clauses) (if (endp clauses) - nil - (let ((clause (first clauses))) - (if (atom clause) - (error "Cond clause is not a list: ~S" clause) - (let ((test (first clause)) - (forms (rest clause))) - (if (endp forms) - (let ((n-result (gensym))) - `(let ((,n-result ,test)) - (if ,n-result - ,n-result - (cond ,@(rest clauses))))) - `(if ,test - (progn ,@forms) - (cond ,@(rest clauses))))))))) + nil + (let ((clause (first clauses))) + (if (atom clause) + (error "COND clause is not a list: ~S" clause) + (let ((test (first clause)) + (forms (rest clause))) + (if (endp forms) + (let ((n-result (gensym))) + `(let ((,n-result ,test)) + (if ,n-result + ,n-result + (cond ,@(rest clauses))))) + `(if ,test + (progn ,@forms) + (cond ,@(rest clauses))))))))) ;;; other things defined in terms of COND (defmacro-mundanely when (test &body forms) diff --git a/tests/core.test.sh b/tests/core.test.sh new file mode 100644 index 0000000..2242470 --- /dev/null +++ b/tests/core.test.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# tests related to .core files + +# This software is part of the SBCL system. See the README file for +# more information. +# +# While most of SBCL is derived from the CMU CL system, the test +# files (like this one) were written from scratch after the fork +# from CMU CL. +# +# This software is in the public domain and is provided with +# absolutely no warranty. See the COPYING and CREDITS files for +# more information. + +tmpcore="core-test-sh-$$.core" +rm -f $tmpcore + +# In sbcl-0.7.7 SAVE-LISP-AND-DIE didn't work at all because of +# flakiness caused by consing/GC/purify twice-and-at-least-twice +# mismatch grot. +# +# "serves yall right for fiddling with too much stuff" +# -- Eric Marsden, +# +# diagnosed and fixed by Dan Barlow in sbcl-0.7.7.29 +$SBCL <