:disp (- function-pointer-type other-pointer-type)))
(inst add func code)))
-(defknown %function-self (function) function (flushable))
-
(define-vop (%function-self)
(:policy :fast-safe)
(:translate %function-self)
:disp (- function-pointer-type
(* function-code-offset word-bytes))))))
-;;; The closure function slot is a pointer to raw code on X86 instead of
-;;; a pointer to the code function object itself. This VOP is used
+;;; The closure function slot is a pointer to raw code on X86 instead
+;;; of a pointer to the code function object itself. This VOP is used
;;; to reference the function object given the closure object.
(def-source-transform %closure-function (closure)
`(%function-self ,closure))
(def-source-transform %funcallable-instance-function (fin)
`(%function-self ,fin))
-(defknown (setf %function-self) (function function) function (unsafe))
-
(define-vop (%set-function-self)
(:policy :fast-safe)
(:translate (setf %function-self))
(storew temp function function-self-slot function-pointer-type)
(move result new-self)))
-;; We would have really liked to use a source-transform for this, but
-;; they don't work with SETF functions.
+;;; KLUDGE: This seems to be some kind of weird override of the way
+;;; that the objdef.lisp code would ordinarily set up the slot
+;;; accessor. It's inherited from CMU CL, and it works, and naively
+;;; deleting it seemed to cause problems, but it's not obvious why
+;;; it's done this way. Any ideas? -- WHN 2001-08-02
(defknown ((setf %funcallable-instance-function)) (function function) function
(unsafe))
+;;; CMU CL comment:
+;;; We would have really liked to use a source-transform for this, but
+;;; they don't work with SETF functions.
+;;; FIXME: Can't we just use DEFSETF or something?
(deftransform (setf %funcallable-instance-function) ((value fin))
'(setf (%function-self fin) value))
\f