0.pre7.54:
[sbcl.git] / src / compiler / generic / objdef.lisp
index 9320639..3dfb2f8 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))
-  #!+gengc (entry-point :c-type "char *")
+  #!-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
+         )
   (next :type (or function null)
        :ref-known (flushable)
        :ref-trans %function-next
           :set-known (unsafe)
           :set-trans (setf %function-arglist))
   (type :ref-known (flushable)
-       :ref-trans %function-type
+       :ref-trans %fun-type
        :set-known (unsafe)
-       :set-trans (setf %function-type))
+       :set-trans (setf %fun-type))
   (code :rest-p t :c-type "unsigned char"))
 
-#!-gengc
 (define-primitive-object (return-pc :lowtag other-pointer-type :header t)
   (return-point :c-type "unsigned char" :rest-p t))
 
 (define-primitive-object (closure :lowtag function-pointer-type
                                  :header closure-header-type)
-  #!-gengc (function :init :arg :ref-trans %closure-function)
-  #!+gengc (entry-point :c-type "char *")
+  (function :init :arg :ref-trans %closure-function)
   (info :rest-p t))
 
 (define-primitive-object (funcallable-instance
                          :lowtag function-pointer-type
                          :header funcallable-instance-header-type
                          :alloc-trans %make-funcallable-instance)
-  #!-(or gengc x86)
+  #!-x86
   (function
    :ref-known (flushable) :ref-trans %funcallable-instance-function
    :set-known (unsafe) :set-trans (setf %funcallable-instance-function))
    ;; 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
+   ;; It's definitely not very clean, with too many #!+ conditionals and
+   ;; too little documentation, 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))
   (layout :init :arg
 \f
 ;;;; symbols
 
-#!+gengc
-(defknown %make-symbol (index simple-string) symbol
-  (flushable movable))
-
-#!+gengc
-(defknown symbol-hash (symbol) index
-  (flushable movable))
-
 #!+x86
 (defknown symbol-hash (symbol) (integer 0 #.*target-most-positive-fixnum*)
   (flushable movable))
 
 (define-primitive-object (symbol :lowtag other-pointer-type
                                 :header symbol-header-type
-                                #!-x86 :alloc-trans
-                                #!-(or gengc x86) make-symbol
-                                #!+gengc %make-symbol)
+                                #!-x86 :alloc-trans #!-x86 make-symbol)
   (value :set-trans %set-symbol-value
         :init :unbound)
-  #!-(or gengc x86) unused
-  #!+gengc (hash :init :arg)
   #!+x86 (hash)
   (plist :ref-trans symbol-plist
         :set-trans %set-symbol-plist