From: William Harold Newman Date: Thu, 7 Mar 2002 02:02:23 +0000 (+0000) Subject: 0.7.1.33: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=b05ccdd91520249de6b465e226d3708089e541dc;p=sbcl.git 0.7.1.33: merged APD "bug 152" patch sbcl-devel 2002-03-06 --- diff --git a/BUGS b/BUGS index 7d746d3..7e1cd47 100644 --- a/BUGS +++ b/BUGS @@ -1275,12 +1275,6 @@ WORKAROUND: Instead, in sbcl-0.7.1.17 it returns # -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 --- 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 diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index 61a0121..7100849 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -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" diff --git a/src/code/interr.lisp b/src/code/interr.lisp index 24191be..95d4437 100644 --- a/src/code/interr.lisp +++ b/src/code/interr.lisp @@ -173,17 +173,12 @@ :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" diff --git a/src/compiler/alpha/cell.lisp b/src/compiler/alpha/cell.lisp index cdee958..93592cf 100644 --- a/src/compiler/alpha/cell.lisp +++ b/src/compiler/alpha/cell.lisp @@ -104,7 +104,7 @@ (: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)))) diff --git a/src/compiler/generic/genesis.lisp b/src/compiler/generic/genesis.lisp index 4f4f5f1..b803202 100644 --- a/src/compiler/generic/genesis.lisp +++ b/src/compiler/generic/genesis.lisp @@ -2642,12 +2642,16 @@ (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 diff --git a/src/compiler/generic/interr.lisp b/src/compiler/generic/interr.lisp index b9814bb..ea88a91 100644 --- a/src/compiler/generic/interr.lisp +++ b/src/compiler/generic/interr.lisp @@ -25,6 +25,10 @@ (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)) @@ -83,21 +87,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-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 @@ -112,8 +111,6 @@ "odd number of &KEY arguments") (unknown-key-arg "unknown &KEY argument") - nil - nil (invalid-array-index "invalid array index") (wrong-number-of-indices diff --git a/src/compiler/sparc/cell.lisp b/src/compiler/sparc/cell.lisp index 2d632bc..250098c 100644 --- a/src/compiler/sparc/cell.lisp +++ b/src/compiler/sparc/cell.lisp @@ -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))) diff --git a/src/compiler/x86/cell.lisp b/src/compiler/x86/cell.lisp index 690d585..f34e9ac 100644 --- a/src/compiler/x86/cell.lisp +++ b/src/compiler/x86/cell.lisp @@ -139,10 +139,7 @@ (: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) diff --git a/src/runtime/alpha-assem.S b/src/runtime/alpha-assem.S index 3fd27e6..ed5074f 100644 --- a/src/runtime/alpha-assem.S +++ b/src/runtime/alpha-assem.S @@ -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 diff --git a/src/runtime/sparc-assem.S b/src/runtime/sparc-assem.S index a6c0303..804497f 100644 --- a/src/runtime/sparc-assem.S +++ b/src/runtime/sparc-assem.S @@ -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: diff --git a/src/runtime/x86-assem.S b/src/runtime/x86-assem.S index cd06563..be58839 100644 --- a/src/runtime/x86-assem.S +++ b/src/runtime/x86-assem.S @@ -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) diff --git a/version.lisp-expr b/version.lisp-expr index 6f2e94e..777e090 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"