From: Alexey D. <ade...@us...> - 2003-09-14 07:44:49
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1:/tmp/cvs-serv21618/tests Modified Files: compiler.impure.lisp Added Files: bug-doug-mcnaught-20030914.lisp Log Message: 0.8.3.60: * Fix bug reported by Doug McNaught: COMPILE-FILE should bind *READTABLE* (we bind it in SUB-COMPILE-FILE). --- NEW FILE: bug-doug-mcnaught-20030914.lisp --- (eval-when (:compile-toplevel :load-toplevel :execute) (setq *readtable* (copy-readtable nil)) ; LOAD binds *readtable*... (set-macro-character #\] (get-macro-character #\))) (set-dispatch-macro-character #\# #\[ #'(lambda (s c n) (declare (ignore c)) (let* ((type (if n `(unsigned-byte ,n) '(unsigned-byte 8))) (list (read-delimited-list #\] s nil)) (len (length list))) (make-array (list len) :element-type type :initial-contents list))))) (defvar *bug-doug-mcnaught-20030914* '#4[1 2 3]) Index: compiler.impure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/compiler.impure.lisp,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- compiler.impure.lisp 10 Jul 2003 07:27:03 -0000 1.49 +++ compiler.impure.lisp 14 Sep 2003 07:44:45 -0000 1.50 @@ -845,6 +845,27 @@ (declare (optimize (speed 0) (safety 3) (space 0) (debug 1) (compilation-speed 0))) (adjoin a b)) + +;;; bug reported by Doug McNaught on sbcl-devel 2003-09-14: +;;; COMPILE-FILE did not bind *READTABLE* +(let* ((source "bug-doug-mcnaught-20030914.lisp") + (fasl (compile-file-pathname source))) + (labels ((check () + (assert (null (get-macro-character #\])))) + (full-check () + (check) + (assert (typep *bug-doug-mcnaught-20030914* + '(simple-array (unsigned-byte 4) (*)))) + (assert (equalp *bug-doug-mcnaught-20030914* #(1 2 3))) + (makunbound '*bug-doug-mcnaught-20030914*))) + (compile-file source) + (check) + (load fasl) + (full-check) + (load source) + (full-check) + (delete-file fasl))) + ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself |