projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.7.7.13:
[sbcl.git]
/
src
/
code
/
fdefinition.lisp
diff --git
a/src/code/fdefinition.lisp
b/src/code/fdefinition.lisp
index
c783672
..
78a574a
100644
(file)
--- a/
src/code/fdefinition.lisp
+++ b/
src/code/fdefinition.lisp
@@
-54,12
+54,7
@@
;;; CREATE is non-NIL, create a new (unbound) one.
(defun fdefinition-object (name create)
(declare (values (or fdefn null)))
;;; CREATE is non-NIL, create a new (unbound) one.
(defun fdefinition-object (name create)
(declare (values (or fdefn null)))
- (unless (legal-fun-name-p name)
- (error 'simple-type-error
- :datum name
- :expected-type '(or symbol list)
- :format-control "invalid function name: ~S"
- :format-arguments (list name)))
+ (legal-fun-name-or-type-error name)
(let ((fdefn (info :function :definition name)))
(if (and (null fdefn) create)
(setf (info :function :definition name) (make-fdefn name))
(let ((fdefn (info :function :definition name)))
(if (and (null fdefn) create)
(setf (info :function :definition name) (make-fdefn name))
@@
-97,8
+92,8
@@
(definition nil :type function))
;;; Replace the definition of NAME with a function that binds NAME's
(definition nil :type function))
;;; Replace the definition of NAME with a function that binds NAME's
-;;; arguments a variable named argument-list, binds name's definition
-;;; to a variable named basic-definition, and evaluates BODY in that
+;;; arguments to a variable named ARG-LIST, binds name's definition
+;;; to a variable named BASIC-DEFINITION, and evaluates BODY in that
;;; context. TYPE is whatever you would like to associate with this
;;; encapsulation for identification in case you need multiple
;;; encapsulations of the same name.
;;; context. TYPE is whatever you would like to associate with this
;;; encapsulation for identification in case you need multiple
;;; encapsulations of the same name.
@@
-117,8
+112,8
@@
;; an encapsulation that no longer exists.
(let ((info (make-encapsulation-info type (fdefn-fun fdefn))))
(setf (fdefn-fun fdefn)
;; an encapsulation that no longer exists.
(let ((info (make-encapsulation-info type (fdefn-fun fdefn))))
(setf (fdefn-fun fdefn)
- (lambda (&rest argument-list)
- (declare (special argument-list))
+ (lambda (&rest arg-list)
+ (declare (special arg-list))
(let ((basic-definition (encapsulation-info-definition info)))
(declare (special basic-definition))
(eval body)))))))
(let ((basic-definition (encapsulation-info-definition info)))
(declare (special basic-definition))
(eval body)))))))
@@
-224,10
+219,10
@@
This is SETF'able."
(let ((fun (%coerce-name-to-fun name)))
(loop
This is SETF'able."
(let ((fun (%coerce-name-to-fun name)))
(loop
- (let ((encap-info (encapsulation-info fun)))
- (if encap-info
- (setf fun (encapsulation-info-definition encap-info))
- (return fun))))))
+ (let ((encap-info (encapsulation-info fun)))
+ (if encap-info
+ (setf fun (encapsulation-info-definition encap-info))
+ (return fun))))))
(defvar *setf-fdefinition-hook* nil
#!+sb-doc
(defvar *setf-fdefinition-hook* nil
#!+sb-doc
@@
-273,4
+268,5
@@
(let ((fdefn (fdefinition-object name nil)))
(when fdefn
(fdefn-makunbound fdefn)))
(let ((fdefn (fdefinition-object name nil)))
(when fdefn
(fdefn-makunbound fdefn)))
+ (sb!kernel:undefine-fun-name name)
name)
name)