X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Finterr.lisp;h=1a96e19cfb0f30ad5b54459571064a848ee287bf;hb=902e93736a0888aa6b04dc328b1eb328423bf426;hp=be981836d186814677577d4db277e7bb6e135d3c;hpb=39e38e4c91fdfc368c60220a1b38ffefb86ff403;p=sbcl.git diff --git a/src/compiler/generic/interr.lisp b/src/compiler/generic/interr.lisp index be98183..1a96e19 100644 --- a/src/compiler/generic/interr.lisp +++ b/src/compiler/generic/interr.lisp @@ -20,11 +20,16 @@ ;;; FIXME: Having each of these error handlers be a full, named function ;;; seems to contribute a noticeable amount of bloat and little value. ;;; Perhaps we could just make a single error-handling function with a -;;; big CASE statement inside it? +;;; big CASE statement inside it? Or at least implement the error handling +;;; functions as closures instead of DEFUNs? (eval-when (:compile-toplevel :execute) (def!macro define-internal-errors (&rest errors) - (let ((info (mapcar #'(lambda (x) - (if x + (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)) '(nil . "unused"))) @@ -37,7 +42,7 @@ (define-internal-errors (unknown "unknown system lossage") - (object-not-function + (object-not-fun "Object is not of type FUNCTION.") (object-not-list "Object is not of type LIST.") @@ -54,18 +59,20 @@ "Object is not of type LONG-FLOAT.") (object-not-simple-string "Object is not of type SIMPLE-STRING.") + (object-not-simple-base-string + "Object is not of type SIMPLE-BASE-STRING.") (object-not-simple-bit-vector "Object is not of type SIMPLE-BIT-VECTOR.") (object-not-simple-vector "Object is not of type SIMPLE-VECTOR.") (object-not-fixnum "Object is not of type FIXNUM.") - (object-not-function-or-symbol - "Object is not of type FUNCTION or SYMBOL.") (object-not-vector "Object is not of type VECTOR.") (object-not-string "Object is not of type STRING.") + (object-not-base-string + "Object is not of type BASE-STRING.") (object-not-bit-vector "Object is not of type BIT-VECTOR.") (object-not-array @@ -84,21 +91,16 @@ "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-function - "Object is not coerceable to type FUNCTION.") - (invalid-argument-count + (invalid-arg-count "invalid argument count") - (bogus-argument-to-values-list + (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 @@ -109,12 +111,10 @@ "division by zero") (object-not-type "Object is of the wrong type.") - (odd-keyword-arguments - "odd number of keyword arguments") - (unknown-keyword-argument - "unknown keyword") - nil - nil + (odd-key-args + "odd number of &KEY arguments") + (unknown-key-arg + "unknown &KEY argument") (invalid-array-index "invalid array index") (wrong-number-of-indices @@ -125,6 +125,8 @@ "Object is not of type (SIGNED-BYTE 32).") (object-not-unsigned-byte-32 "Object is not of type (UNSIGNED-BYTE 32).") + (object-not-simple-array-nil + "Object is not of type (SIMPLE-ARRAY NIL (*)).") (object-not-simple-array-unsigned-byte-2 "Object is not of type (SIMPLE-ARRAY (UNSIGNED-BYTE 2) (*)).") (object-not-simple-array-unsigned-byte-4 @@ -176,9 +178,11 @@ "Object is not a INSTANCE.") (object-not-base-char "Object is not of type BASE-CHAR.") - (nil-function-returned + (nil-fun-returned "A function with declared result type NIL returned.") + (nil-array-accessed + "An array with element-type NIL was accessed.") (layout-invalid - "invalid layout (indicates obsolete instance)") + "Object layout is invalid. (indicates obsolete instance)") (object-not-complex-vector "Object is not a complex (non-SIMPLE-ARRAY) vector."))