X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fmacros.lisp;h=70130803c9b26703d96e5bbffd9b60987b88f791;hb=2695f20cc74e0693f184fa5c7327d4c557e5537f;hp=dcb5df598b775917a31b00a26c22531ae45cbbac;hpb=26b8ddda97fcfa2e2c0eae3bd2fdb19717c5fa40;p=sbcl.git diff --git a/src/pcl/macros.lisp b/src/pcl/macros.lisp index dcb5df5..7013080 100644 --- a/src/pcl/macros.lisp +++ b/src/pcl/macros.lisp @@ -37,26 +37,6 @@ ;; information around, I'm not sure. -- WHN 2000-12-30 %variable-rebinding)) -(defmacro name-get-fdefinition (name) - (sb-int:once-only ((name name)) - `(if (symbolp ,name) ; take care of "setf "'s - (symbol-function ,name) - (fdefinition ,name)))) - -(defmacro name-set-fdefinition (name new-definition) - (sb-int:once-only ((name name)) - `(if (symbolp ,name) ; take care of "setf "'s - (setf (symbol-function ,name) ,new-definition) - (setf (fdefinition ,name) ,new-definition)))) - -;;; FIXME: CONSTANTLY-FOO should be boosted up to SB-INT too. -(macrolet ((def-constantly-fun (name constant-expr) - `(setf (symbol-function ',name) - (constantly ,constant-expr)))) - (def-constantly-fun constantly-t t) - (def-constantly-fun constantly-nil nil) - (def-constantly-fun constantly-0 0)) - ;;; FIXME: This looks like SBCL's PARSE-BODY, and should be shared. (eval-when (:compile-toplevel :load-toplevel :execute) (defun extract-declarations (body &optional environment) @@ -75,7 +55,7 @@ (loop (cond ((not (listp form)) (return-from outer nil)) ((eq (car form) 'declare) - (return-from inner 't)) + (return-from inner t)) (t (multiple-value-bind (newform macrop) (macroexpand-1 form environment) @@ -230,10 +210,11 @@ (eq *boot-state* 'braid)) (when (and new-value (class-wrapper new-value)) (setf (find-class-cell-predicate cell) - (name-get-fdefinition (class-predicate-name new-value)))) + (fdefinition (class-predicate-name new-value)))) (when (and new-value (not (forward-referenced-class-p new-value))) - (dolist (keys+aok (find-class-cell-make-instance-function-keys cell)) + (dolist (keys+aok (find-class-cell-make-instance-function-keys + cell)) (update-initialize-info-internal (initialize-info new-value (car keys+aok) nil (cdr keys+aok)) 'make-instance-function)))) @@ -267,8 +248,8 @@ value))) #'(lambda () result)))) -;;; These are augmented definitions of list-elements and list-tails from -;;; iterate.lisp. These versions provide the extra :by keyword which can +;;; These are augmented definitions of LIST-ELEMENTS and LIST-TAILS from +;;; iterate.lisp. These versions provide the extra :BY keyword which can ;;; be used to specify the step function through the list. (defmacro *list-elements (list &key (by #'cdr)) `(let ((tail ,list))