0.7.9.33:
authorChristophe Rhodes <csr21@cam.ac.uk>
Wed, 6 Nov 2002 09:59:28 +0000 (09:59 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Wed, 6 Nov 2002 09:59:28 +0000 (09:59 +0000)
Make FUNCALL QUOTE signal an UNDEFINED-FUNCTION error, as
required under the CLHS FUNCALL description
... detected by Paul Dietz' test suite

BUGS
NEWS
package-data-list.lisp-expr
src/code/condition.lisp
src/compiler/macros.lisp
tests/compiler.pure.lisp
tests/loop.pure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index bbf6c30..336ebd9 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -382,6 +382,9 @@ WORKAROUND:
   LOAD-FOREIGN, and (2) hunt for any other code which uses temporary
   files and make it share the same new safe logic.
 
+  (partially alleviated in sbcl-0.7.9.32 by a fix by Matthew Danish to
+   make the temporary filename less easily guessable)
+
 82: 
   Functions are assigned names based on the context in which they're
   defined. This is less than ideal for the functions which are
@@ -795,14 +798,6 @@ WORKAROUND:
   macro is unhappy with the illegal syntax in the method body, and
   is giving an unclear error message.
 
-172:
-  sbcl's treatment of at least macro lambda lists is too permissive;
-  e.g., in sbcl-0.7.3.7:
-    (defmacro foo (&rest rest bar) `(,bar ,rest))
-    (macroexpand '(foo quux zot)) -> (QUUX (QUUX ZOT))
-  whereas section 3.4.4 of the CLHS doesn't allow required parameters
-  to come after the rest argument.
-
 173:
   The compiler sometimes tries to constant-fold expressions before
   it checks to see whether they can be reached. This can lead to 
diff --git a/NEWS b/NEWS
index 02bd302..660bcce 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1362,7 +1362,7 @@ changes in sbcl-0.7.10 relative to sbcl-0.7.9:
        FORWARD-REFERENCED-CLASSes; error reporting on
        CLASS-DEFAULT-INITARGS, CLASS-PRECEDENCE-LIST and CLASS-SLOTS
        has been improved;
-  * fixed some bugs, shown by Paul Dietz' test suite:
+  * fixed some bugs shown by Paul Dietz' test suite:
     ** DOLIST puts its body in TAGBODY
     ** SET-EXCLUSIVE-OR sends arguments to :TEST function in the
        correct order
@@ -1376,6 +1376,8 @@ changes in sbcl-0.7.10 relative to sbcl-0.7.9:
        is not a valid sequence index;
     ** LOOP signals (at macroexpansion time) an error of type
        PROGRAM-ERROR when duplicate variable names are found;
+    ** FUNCALL of special-operators now cause an error of type
+       UNDEFINED-FUNCTION;
   * fixed bug 166: compiler preserves "there is a way to go"
     invariant when deleting code.
   * fixed bug 172: macro lambda lists with required arguments after
index b44e9f8..2882ecc 100644 (file)
@@ -693,6 +693,7 @@ retained, possibly temporariliy, because it might be used internally."
              "SIMPLE-PARSE-ERROR"
              "SIMPLE-PROGRAM-ERROR" "SIMPLE-STREAM-ERROR"
              "SIMPLE-STYLE-WARNING"
+            "SPECIAL-FORM-FUNCTION"
              "STYLE-WARN"
 
              ;; bootstrapping magic, to make things happen both in
index 428c7dd..d6cfa9d 100644 (file)
             "The function ~S is undefined."
             (cell-error-name condition)))))
 
+(define-condition special-form-function (undefined-function) ()
+  (:report
+   (lambda (condition stream)
+     (format stream
+            "Cannot FUNCALL the SYMBOL-FUNCTION of special operator ~S."
+            (cell-error-name condition)))))
+
 (define-condition arithmetic-error (error)
   ((operation :reader arithmetic-error-operation
              :initarg :operation
index 941cef4..97be928 100644 (file)
@@ -78,8 +78,8 @@
             `((setf (symbol-function ',name)
                     (lambda (&rest rest)
                       (declare (ignore rest))
-                      (error "can't FUNCALL the SYMBOL-FUNCTION of ~
-                              special forms")))))))))
+                      (error 'special-form-function
+                             :name ',name)))))))))
 
 ;;; (This is similar to DEF-IR1-TRANSLATOR, except that we pass if the
 ;;; syntax is invalid.)
index 704a693..a4e7476 100644 (file)
          
 ;;; FTYPE should accept any functional type specifier
 (compile nil '(lambda (x) (declare (ftype function f)) (f x)))
+
+;;; FUNCALL of special operators and macros should signal an
+;;; UNDEFINED-FUNCTION error
+(multiple-value-bind (result error)
+    (ignore-errors (funcall 'quote 1))
+  (assert (null result))
+  (assert (typep error 'undefined-function))
+  (assert (eq (cell-error-name error) 'quote)))
+(multiple-value-bind (result error)
+    (ignore-errors (funcall 'and 1))
+  (assert (null result))
+  (assert (typep error 'undefined-function))
+  (assert (eq (cell-error-name error) 'and)))
index 23f6691..222f418 100644 (file)
@@ -63,4 +63,4 @@
                            (funcall (lambda ()
                                       (loop for (a . a) in '((1 . 2) (3 . 4))
                                             return a)))))
-              'program-error))
\ No newline at end of file
+              'program-error))
index ea30ceb..ac595bf 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.7.9.32"
+"0.7.9.33"