0.pre7.14.flaky4.5:
[sbcl.git] / src / compiler / generic / objdef.lisp
index 2bd2a49..61cfaab 100644 (file)
 (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)
                          :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))
 
 ;;; (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))
 \f
 ;;;; symbols