X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fsystem.lisp;h=86cc5001d9d8a3887133589ab22915feb415a56a;hb=872175cd9cb5b4966a36d4bd92421cc407a0355b;hp=edb3f8ced5b4f1149fc9fb87d40e686a169675d6;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/compiler/x86/system.lisp b/src/compiler/x86/system.lisp index edb3f8c..86cc500 100644 --- a/src/compiler/x86/system.lisp +++ b/src/compiler/x86/system.lisp @@ -214,8 +214,6 @@ :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) @@ -228,8 +226,8 @@ :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)) @@ -237,8 +235,6 @@ (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)) @@ -254,10 +250,17 @@ (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))