"DEFCONSTANT-UNEQL" "DEFCONSTANT-UNEQL-NAME"
"DEFCONSTANT-UNEQL-NEW-VALUE" "DEFCONSTANT-UNEQL-OLD-VALUE"
+ ;; error signalled when attempt to load an invalid fasl
+ ;; is made, so that user code can try to recompile, etc.
+ "INVALID-FASL"
+
;; conditions that can be handled to reduce compiler
;; verbosity
"CODE-DELETION-NOTE" "COMPILER-NOTE"
;; to hide it from them..
"INTERACTIVE-EVAL"
- ;; Subtype of SIMPLE-ERROR signalled when attempt to
- ;; load an invalid fasl is made, so that user-code can
- ;; try to recompile, etc.
- "INVALID-FASL"
-
;; weak pointers and finalization
"CANCEL-FINALIZATION"
"FINALIZE"
;;;; make only condition INVALID-FASL part of the public interface,
;;;; and keep the guts internal.
-(define-condition sb!ext::invalid-fasl (error)
+(define-condition invalid-fasl (error)
((stream :reader invalid-fasl-stream :initarg :stream)
(expected :reader invalid-fasl-expected :initarg :expected))
(:report
(format stream "~S is an invalid fasl file."
(invalid-fasl-stream condition)))))
-(define-condition invalid-fasl-header (sb!ext::invalid-fasl)
+(define-condition invalid-fasl-header (invalid-fasl)
((byte :reader invalid-fasl-byte :initarg :byte)
(byte-nr :reader invalid-fasl-byte-nr :initarg :byte-nr))
(:report
(invalid-fasl-byte condition)
(invalid-fasl-expected condition)))))
-(define-condition invalid-fasl-version (sb!ext::invalid-fasl)
+(define-condition invalid-fasl-version (invalid-fasl)
((variant :reader invalid-fasl-variant :initarg :variant)
(version :reader invalid-fasl-version :initarg :version))
(:report
(invalid-fasl-version condition)
(invalid-fasl-expected condition)))))
-(define-condition invalid-fasl-implementation (sb!ext::invalid-fasl)
+(define-condition invalid-fasl-implementation (invalid-fasl)
((implementation :reader invalid-fasl-implementation
:initarg :implementation))
(:report
(invalid-fasl-implementation condition)
(invalid-fasl-expected condition)))))
-(define-condition invalid-fasl-features (sb!ext::invalid-fasl)
+(define-condition invalid-fasl-features (invalid-fasl)
((potential-features :reader invalid-fasl-potential-features
:initarg :potential-features)
(features :reader invalid-fasl-features :initarg :features))
\f
;;;; LOAD itself
-(define-condition fasl-header-missing (sb!ext::invalid-fasl)
+(define-condition fasl-header-missing (invalid-fasl)
((fhsss :reader invalid-fasl-fhsss :initarg :fhsss))
(:report
(lambda (condition stream)
(list class-name)
(list class-name)
"automatically generated boundp method")))
- (let ((gf (ensure-generic-function accessor-name)))
+ (let ((gf (ensure-generic-function accessor-name
+ :lambda-list arglist)))
(if (find specls (early-gf-methods gf)
:key #'early-method-specializers
:test 'equal)
(pushnew 'maybe-reinitialize-structure-class sb-kernel::*defstruct-hooks*)
\f
(defun make-class-predicate (class name)
- (let* ((gf (ensure-generic-function name))
+ (let* ((gf (ensure-generic-function name :lambda-list '(object)))
(mlist (if (eq *boot-state* 'complete)
(generic-function-methods gf)
(early-gf-methods gf))))
(slot-missing-fun slot-name type)
"generated slot-missing method"
slot-name)))))
- (unless (fboundp fun-name)
- (let ((gf (ensure-generic-function fun-name)))
+ (unless (fboundp fun-name)
+ (let ((gf (ensure-generic-function
+ fun-name
+ :lambda-list (ecase type
+ ((reader boundp) '(object))
+ (writer '(new-value object))))))
(ecase type
(reader (add-slot-missing-method gf slot-name 'slot-value))
(boundp (add-slot-missing-method gf slot-name 'slot-boundp))
(defun fix-slot-accessors (class dslotds add/remove)
(flet ((fix (gfspec name r/w)
- (let ((gf (ensure-generic-function gfspec)))
+ (let* ((ll (case r/w (r '(object)) (w '(new-value object))))
+ (gf (if (fboundp gfspec)
+ (ensure-generic-function gfspec)
+ (ensure-generic-function gfspec :lambda-list ll))))
(case r/w
(r (if (eq add/remove 'add)
(add-reader-method class gf name)
:font 'baskerville :pixel-size 10)
'baskerville))
+;;; class redefinition shouldn't give any warnings, in the usual case
+(defclass about-to-be-redefined () ((some-slot :accessor some-slot)))
+(handler-bind ((warning #'error))
+ (defclass about-to-be-redefined () ((some-slot :accessor some-slot))))
+
+;;; attempts to add accessorish methods to generic functions with more
+;;; complex lambda lists should fail
+(defgeneric accessoroid (object &key &allow-other-keys))
+(assert (raises-error?
+ (defclass accessoroid-class () ((slot :accessor accessoroid)))
+ program-error))
+
;;;; success
(sb-ext:quit :unix-status 104)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.4.29"
+"0.8.4.30"