0.pre8.68:
authorWilliam Harold Newman <william.newman@airmail.net>
Thu, 17 Apr 2003 22:50:39 +0000 (22:50 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Thu, 17 Apr 2003 22:50:39 +0000 (22:50 +0000)
Compile (COERCE FOO 'SIMPLE-VECTOR) to reasonably efficient
code (no full call to %TYPEP) even when safe.
made DESCRIBE work on structures again
bug report for ROOM

BUGS
src/code/profile.lisp
src/compiler/typetran.lisp
src/pcl/braid.lisp
tests/smoke.impure.lisp [new file with mode: 0644]
version.lisp-expr

diff --git a/BUGS b/BUGS
index 2b36d3f..3389897 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1308,6 +1308,13 @@ WORKAROUND:
   (NTH-VALUE 1000 (VALUES-LIST (MAKE-LIST 1001))) takes several hours
   to compile.
 
+247: "incomplete conversion of stack parameters in #-SB-THREAD code"
+  In 0.pre8.67/x86/nothreads, executing (ROOM) causes an error to
+  be signalled:
+    The variable SB-VM:CONTROL-STACK-END is unbound.
+  (When this is fixed, the ROOM entries in tests/smoke.impure.lisp
+  should be uncommented.)
+
 DEFUNCT CATEGORIES OF BUGS
   IR1-#:
     These labels were used for bugs related to the old IR1 interpreter.
index 1f4f793..87eab0b 100644 (file)
@@ -98,8 +98,7 @@
 \f
 ;;;; profile encapsulations
 
-;;; Trade off space for time by handling the usual all-FIXNUM cases
-;;; inline.
+;;; Trade off space for time by handling the usual all-FIXNUM cases inline.
 (defmacro fastbig- (x y)
   (once-only ((x x) (y y))
     `(if (and (typep ,x '(and fixnum unsigned-byte))
         (aver (typep dticks 'unsigned-byte))
         (aver (typep dconsing 'unsigned-byte))
         (aver (typep inner-enclosed-profiles 'unsigned-byte))
-        (multiple-value-prog1
+        (unwind-protect
             (let* ((start-ticks (get-internal-ticks))
                    (*enclosed-ticks* 0)
                    (*enclosed-consing* 0)
                    (nbf0 *n-bytes-freed-or-purified*)
                    (dynamic-usage-0 (sb-kernel:dynamic-usage)))
               (declare (inline pcounter-or-fixnum->integer))
-              (multiple-value-prog1
+              (unwind-protect
                   (multiple-value-call encapsulated-fun
                                        (sb-c:%more-arg-values arg-context
                                                               0
                         (pcounter-or-fixnum->integer *enclosed-profiles*))
                   (let ((net-dticks (fastbig- dticks *enclosed-ticks*)))
                     (fastbig-incf-pcounter-or-fixnum ticks net-dticks))
-                  (let ((net-dconsing (fastbig- dconsing *enclosed-consing*)))
+                  (let ((net-dconsing (fastbig- dconsing
+                                                (pcounter-or-fixnum->integer
+                                                 *enclosed-consing*))))
                     (fastbig-incf-pcounter-or-fixnum consing net-dconsing))
                   (fastbig-incf-pcounter-or-fixnum profiles
                                                    inner-enclosed-profiles))))
index 06f0de1..c538f46 100644 (file)
             ((csubtypep tspec (specifier-type 'float))
              '(%single-float x))
             ((and (csubtypep tspec (specifier-type 'simple-vector))
-                  (policy node (< safety 3)))
+                  ;; Can we avoid checking for dimension issues like
+                  ;; (COERCE FOO '(SIMPLE-VECTOR 5)) returning a
+                  ;; vector of length 6?
+                  (or (policy node (< safety 3)) ; no need in unsafe code
+                      (and (array-type-p tspec) ; no need when no dimensions
+                           (equal (array-type-dimensions tspec) '(*)))))
              `(if (simple-vector-p x)
                   x
                   (replace (make-array (length x)) x)))
             (t
              (give-up-ir1-transform)))))))
 
+
index 01886b9..87fded0 100644 (file)
             :defstruct-accessor-symbol ,accessor
             ,@(when (fboundp accessor)
                 `(:internal-reader-function
-                  (structure-slotd-reader-function slotd)
+                  ,(structure-slotd-reader-function slotd)
                   :internal-writer-function
                   ,(structure-slotd-writer-function slotd)))
             :type ,(or (structure-slotd-type slotd) t)
diff --git a/tests/smoke.impure.lisp b/tests/smoke.impure.lisp
new file mode 100644 (file)
index 0000000..87c96de
--- /dev/null
@@ -0,0 +1,33 @@
+;;;; rudimentary tests ("smoke tests") for miscellaneous stuff which
+;;;; doesn't seem to deserve specialized files at the moment
+
+;;;; 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.
+
+(cl:in-package :cl-user)
+
+;;; ROOM should run without signalling an error. (bug 247)
+#+nil (room)
+#+nil (room t)
+#+nil (room nil)
+
+;;; DESCRIBE should run without signalling an error.
+(defstruct to-be-described a b)
+(describe (make-to-be-described))
+(describe 12)
+(describe "a string")
+(describe 'symbolism)
+(describe (find-package :cl))
+(describe '(a list))
+(describe #(a vector))
+
+;;; success
+(quit :unix-status 104)
index 229d325..bdcee79 100644 (file)
@@ -18,4 +18,4 @@
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.pre8.67"
+"0.pre8.68"