X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Fobjdef.lisp;h=61cfaab1dd666003dce3f556255f8567579dccad;hb=c8218514d751c4d777892b79bbf1ca6597f731c0;hp=2bd2a4992db3b60056f5d074ef9cf544a34490ca;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/compiler/generic/objdef.lisp b/src/compiler/generic/objdef.lisp index 2bd2a49..61cfaab 100644 --- a/src/compiler/generic/objdef.lisp +++ b/src/compiler/generic/objdef.lisp @@ -139,7 +139,24 @@ (define-primitive-object (function :type function :lowtag function-pointer-type :header function-header-type) - #!-gengc (self :ref-trans %function-self :set-trans (setf %function-self)) + #!-(or gengc x86) (self :ref-trans %function-self + :set-trans (setf %function-self)) + #!+x86 (self + ;; KLUDGE: There's no :SET-KNOWN, :SET-TRANS, :REF-KNOWN, or + ;; :REF-TRANS here in this case. Instead, there's separate + ;; DEFKNOWN/DEFINE-VOP/DEFTRANSFORM stuff in + ;; compiler/x86/system.lisp to define and declare them by + ;; hand. I don't know why this is, but that's (basically) + ;; the way it was done in CMU CL, and it works. (It's not + ;; exactly the same way it was done in CMU CL in that CMU + ;; CL's allows duplicate DEFKNOWNs, blithely overwriting any + ;; previous data associated with the previous DEFKNOWN, and + ;; that property was used to mask the definitions here. In + ;; SBCL as of 0.6.12.64 that's not allowed -- too confusing! + ;; -- so we have to explicitly suppress the DEFKNOWNish + ;; stuff here in order to allow this old hack to work in the + ;; new world. -- WHN 2001-08-82 + ) #!+gengc (entry-point :c-type "char *") (next :type (or function null) :ref-known (flushable) @@ -174,10 +191,28 @@ :lowtag function-pointer-type :header funcallable-instance-header-type :alloc-trans %make-funcallable-instance) - #!-gengc + #!-(or gengc x86) (function :ref-known (flushable) :ref-trans %funcallable-instance-function :set-known (unsafe) :set-trans (setf %funcallable-instance-function)) + #!+x86 + (function + :ref-known (flushable) :ref-trans %funcallable-instance-function + ;; KLUDGE: There's no :SET-KNOWN or :SET-TRANS in this case. + ;; Instead, later in compiler/x86/system.lisp there's a separate + ;; DEFKNOWN for (SETF %FUNCALLABLE-INSTANCE-FUNCTION), and a weird + ;; unexplained DEFTRANSFORM from (SETF %FUNCTION-INSTANCE-FUNCTION) + ;; into (SETF %FUNCTION-SELF). The #!+X86 wrapped around this case + ;; is a literal translation of the old CMU CL implementation into + ;; the new world of sbcl-0.6.12.63, where multiple DEFKNOWNs for + ;; the same operator cause an error (instead of silently deleting + ;; all information associated with the old DEFKNOWN, as before). + ;; It's definitely not very clean, with too many #!+ conditionals, + ;; too little documentation, and an implicit assumption that GENGC + ;; and X86 are mutually exclusive, but I have more urgent things to + ;; clean up right now, so I've just left it as a literal + ;; translation without trying to fix it. -- WHN 2001-08-02 + ) #!+gengc (entry-point :c-type "char *") (lexenv :ref-known (flushable) :ref-trans %funcallable-instance-lexenv :set-known (unsafe) :set-trans (setf %funcallable-instance-lexenv)) @@ -241,7 +276,7 @@ ;;; (For an explanation of this, see the comments at the definition of ;;; KLUDGE-NONDETERMINISTIC-CATCH-BLOCK-SIZE.) -(assert (= sb!vm::kludge-nondeterministic-catch-block-size catch-block-size)) +(aver (= sb!vm::kludge-nondeterministic-catch-block-size catch-block-size)) ;;;; symbols