0.7.1.33:
authorWilliam Harold Newman <william.newman@airmail.net>
Thu, 7 Mar 2002 02:02:23 +0000 (02:02 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Thu, 7 Mar 2002 02:02:23 +0000 (02:02 +0000)
merged APD "bug 152" patch sbcl-devel 2002-03-06

13 files changed:
BUGS
TODO
package-data-list.lisp-expr
src/code/interr.lisp
src/compiler/alpha/cell.lisp
src/compiler/generic/genesis.lisp
src/compiler/generic/interr.lisp
src/compiler/sparc/cell.lisp
src/compiler/x86/cell.lisp
src/runtime/alpha-assem.S
src/runtime/sparc-assem.S
src/runtime/x86-assem.S
version.lisp-expr

diff --git a/BUGS b/BUGS
index 7d746d3..7e1cd47 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1275,12 +1275,6 @@ WORKAROUND:
   Instead, in sbcl-0.7.1.17 it returns
     #<FUNCTION "top level local call SB!IMPL::DISPATCH-CHAR-ERROR">
 
-152:
-  Undefined functions are supposed to be reported as UNDEFINED-FUNCTION
-  conditions, inheriting from CELL-ERROR. Instead sbcl-0.7.1.19 reports
-  them as TYPE-ERRORs (reporting the problem as something not being
-  coerceable to a function).
-
 153:
   (essentially the same problem as a CMU CL bug reported by Martin
   Cracauer on cmucl-imp 2002-02-19)
diff --git a/TODO b/TODO
index 79bc782..8d87d77 100644 (file)
--- a/TODO
+++ b/TODO
@@ -58,7 +58,7 @@ for early 0.7.x:
                        os_trunc_foo(), os_round_up_foo()
                ** removed various avoid-evaluating-C-macro-arg-twice
                        cruft
-* added mechanisms for automatically finding dead symbols is
+* added mechanisms for automatically finding dead symbols in
        package-data.lisp-expr (i.e. those symbols not bound,
        fbound, defined as types, or whatever), and used them
        to remove dead symbols
index 61a0121..7100849 100644 (file)
@@ -1100,7 +1100,6 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
              "NUMERIC-TYPE-HIGH" "NUMERIC-TYPE-LOW" "NUMERIC-TYPE-P"
              "OBJECT-NOT-ARRAY-ERROR" "OBJECT-NOT-BASE-CHAR-ERROR"
              "OBJECT-NOT-BIGNUM-ERROR" "OBJECT-NOT-BIT-VECTOR-ERROR"
-             "OBJECT-NOT-COERCEABLE-TO-FUN-ERROR"
              "OBJECT-NOT-COMPLEX-ERROR"
              "OBJECT-NOT-COMPLEX-FLOAT-ERROR"
              "OBJECT-NOT-COMPLEX-SINGLE-FLOAT-ERROR"
@@ -1203,7 +1202,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
              "TYPE-SPECIFIER" "TYPE-UNION" "TYPE/=" "TYPE="
              "TYPES-EQUAL-OR-INTERSECT"
              "UNBOUND-SYMBOL-ERROR" "UNBOXED-ARRAY"
-             "UNDEFINED-SYMBOL-ERROR" "UNION-TYPE" "UNION-TYPE-P"
+             "UNDEFINED-FUN-ERROR" "UNION-TYPE" "UNION-TYPE-P"
              "UNION-TYPE-TYPES" "UNKNOWN-ERROR"
              "UNKNOWN-KEY-ARG-ERROR"
              "UNKNOWN-TYPE" "UNKNOWN-TYPE-P"
index 24191be..95d4437 100644 (file)
         :datum object
         :expected-type 'symbol))
 
-(deferr undefined-symbol-error (fdefn-or-symbol)
+(deferr undefined-fun-error (fdefn-or-symbol)
   (error 'undefined-function
         :name (etypecase fdefn-or-symbol
                 (symbol fdefn-or-symbol)
                 (fdefn (fdefn-name fdefn-or-symbol)))))
 
-(deferr object-not-coerceable-to-fun-error (object)
-  (error 'type-error
-        :datum object
-        :expected-type 'coerceable-to-fun))
-
 (deferr invalid-arg-count-error (nargs)
   (error 'simple-program-error
         :format-control "invalid number of arguments: ~S"
index cdee958..93592cf 100644 (file)
   (:generator 10
     (move object obj-temp)
     (loadw value obj-temp fdefn-fun-slot other-pointer-lowtag)
-    (let ((err-lab (generate-error-code vop undefined-symbol-error obj-temp)))
+    (let ((err-lab (generate-error-code vop undefined-fun-error obj-temp)))
       (inst cmpeq value null-tn temp)
       (inst bne temp err-lab))))
 
index 4f4f5f1..b803202 100644 (file)
          (format t " /* 0x~X */~@[  /* ~A */~]~%" value doc))))
     (terpri))
 
-  ;; writing codes/strings for internal errors
-  (format t "#define ERRORS { \\~%")
+  ;; writing information about internal errors
   (let ((internal-errors sb!c:*backend-internal-errors*))
     (dotimes (i (length internal-errors))
-      (format t "    ~S, /*~D*/ \\~%" (cdr (aref internal-errors i)) i)))
-  (format t "    NULL \\~%}~%")
+      (let ((current-error (aref internal-errors i)))
+        ;; FIXME: this UNLESS should go away (see also FIXME in
+        ;; interr.lisp) -- APD, 2002-03-05
+        (unless (eq nil (car current-error))
+          (format t "#define ~A ~D~%"
+                  (substitute #\_ #\- (symbol-name (car current-error)))
+                  i)))))
   (terpri)
 
   ;; writing primitive object layouts
index b9814bb..ea88a91 100644 (file)
 (eval-when (:compile-toplevel :execute)
   (def!macro define-internal-errors (&rest errors)
             (let ((info (mapcar (lambda (x)
+                                   ;; FIXME: We shouldn't need placeholder
+                                   ;; NIL entries any more now that we
+                                   ;; pass our magic numbers cleanly
+                                   ;; through sbcl.h.
                                   (if x
                                       (cons (symbolicate (first x) "-ERROR")
                                             (second x))
    "Object is not of type CONS.")
   (object-not-symbol
    "Object is not of type SYMBOL.")
-  (undefined-symbol
+  (undefined-fun
    ;; FIXME: Isn't this used for calls to unbound (SETF FOO) too? If so, revise
    ;; the name.
    "An attempt was made to use an undefined FDEFINITION.")
-  (object-not-coerceable-to-fun
-   "Object is not coerceable to type FUNCTION.")
   (invalid-arg-count
    "invalid argument count")
   (bogus-arg-to-values-list
    "bogus argument to VALUES-LIST")
   (unbound-symbol
    "An attempt was made to use an undefined SYMBOL-VALUE.")
-  ;; FIXME: We shouldn't need these placeholder NIL entries any more
-  ;; now that we pass our magic numbers cleanly through sbcl.h.
-  nil 
   (object-not-sap
    "Object is not a System Area Pointer (SAP).")
   (invalid-unwind
    "odd number of &KEY arguments")
   (unknown-key-arg
    "unknown &KEY argument")
-  nil
-  nil
   (invalid-array-index
    "invalid array index")
   (wrong-number-of-indices
index 2d632bc..250098c 100644 (file)
@@ -94,7 +94,7 @@
     (move obj-temp object)
     (loadw value obj-temp fdefn-fun-slot other-pointer-lowtag)
     (inst cmp value null-tn)
-    (let ((err-lab (generate-error-code vop undefined-symbol-error obj-temp)))
+    (let ((err-lab (generate-error-code vop undefined-fun-error obj-temp)))
       (inst b :eq err-lab))
     (inst nop)))
 
index 690d585..f34e9ac 100644 (file)
   (:generator 10
     (loadw value object fdefn-fun-slot other-pointer-lowtag)
     (inst cmp value nil-value)
-    ;; FIXME: UNDEFINED-SYMBOL-ERROR seems to actually be for symbols with no
-    ;; function value, not, as the name might suggest, symbols with no ordinary
-    ;; value. Perhaps the name could be made more mnemonic?
-    (let ((err-lab (generate-error-code vop undefined-symbol-error object)))
+    (let ((err-lab (generate-error-code vop undefined-fun-error object)))
       (inst jmp :e err-lab))))
 
 (define-vop (set-fdefn-fun)
index 3fd27e6..ed5074f 100644 (file)
@@ -260,7 +260,7 @@ undefined_tramp_offset:
        call_pal PAL_bugchk
        .long    trap_Error
         .byte    4                         /* what are these numbers? */
-        .byte    23
+        .byte    UNDEFINED_FUN_ERROR
         .byte    254
         .byte    (0xe0 + sc_DescriptorReg)
         .byte    2
index a6c0303..804497f 100644 (file)
@@ -216,11 +216,7 @@ undefined_tramp = . + 1
        b       1f
         unimp   trap_Cerror
        .byte   4
-#ifdef type_LongFloat
-        .byte   24
-#else
-       .byte   23
-#endif
+        .byte   UNDEFINED_FUN_ERROR
        .byte   254, sc_DescriptorReg, 3
        .align  4
 1:
index cd06563..be58839 100644 (file)
@@ -262,11 +262,7 @@ GNAME(undefined_tramp):
        int3
        .byte   trap_Error
         .byte   2
-#ifdef LONG_FLOAT_WIDETAG
-        .byte   24
-#else
-        .byte   23
-#endif
+        .byte   UNDEFINED_FUN_ERROR
         .byte   sc_DescriptorReg # eax in the Descriptor-reg SC
        ret
        .size   GNAME(undefined_tramp), .-GNAME(undefined_tramp)
index 6f2e94e..777e090 100644 (file)
@@ -18,4 +18,4 @@
 ;;; for internal versions, especially for internal versions off the
 ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.7.1.32"
+"0.7.1.33"