0.pre7.55:
[sbcl.git] / src / compiler / generic / objdef.lisp
index 61cfaab..e2303d2 100644 (file)
                                :lowtag other-pointer-type
                                :header fdefn-type)
   (name :ref-trans fdefn-name)
-  (function :type (or function null) :ref-trans fdefn-function)
+  (fun :type (or function null) :ref-trans fdefn-fun)
   (raw-addr :c-type #!-alpha "char *" #!+alpha "u32"))
 
-(define-primitive-object (function :type function
-                                  :lowtag function-pointer-type
-                                  :header function-header-type)
-  #!-(or gengc x86) (self :ref-trans %function-self
-                         :set-trans (setf %function-self))
+;;; a simple function (as opposed to hairier things like closures
+;;; which are also subtypes of Common Lisp's FUNCTION type)
+(define-primitive-object (simple-fun :type function
+                                    :lowtag fun-pointer-type
+                                    :header simple-fun-header-type)
+  #!-x86 (self :ref-trans %simple-fun-self
+              :set-trans (setf %simple-fun-self))
   #!+x86 (self
          ;; KLUDGE: There's no :SET-KNOWN, :SET-TRANS, :REF-KNOWN, or
          ;; :REF-TRANS here in this case. Instead, there's separate
          ;; 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)
-       :ref-trans %function-next
+       :ref-trans %simple-fun-next
        :set-known (unsafe)
-       :set-trans (setf %function-next))
+       :set-trans (setf %simple-fun-next))
   (name :ref-known (flushable)
-       :ref-trans %function-name
+       :ref-trans %simple-fun-name
        :set-known (unsafe)
-       :set-trans (setf %function-name))
+       :set-trans (setf %simple-fun-name))
   (arglist :ref-known (flushable)
-          :ref-trans %function-arglist
+          :ref-trans %simple-fun-arglist
           :set-known (unsafe)
-          :set-trans (setf %function-arglist))
+          :set-trans (setf %simple-fun-arglist))
   (type :ref-known (flushable)
-       :ref-trans %function-type
+       :ref-trans %simple-fun-type
        :set-known (unsafe)
-       :set-trans (setf %function-type))
+       :set-trans (setf %simple-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
+(define-primitive-object (closure :lowtag fun-pointer-type
                                  :header closure-header-type)
-  #!-gengc (function :init :arg :ref-trans %closure-function)
-  #!+gengc (entry-point :c-type "char *")
+  (fun :init :arg :ref-trans %closure-fun)
   (info :rest-p t))
 
 (define-primitive-object (funcallable-instance
-                         :lowtag function-pointer-type
+                         :lowtag fun-pointer-type
                          :header funcallable-instance-header-type
                          :alloc-trans %make-funcallable-instance)
-  #!-(or gengc x86)
-  (function
-   :ref-known (flushable) :ref-trans %funcallable-instance-function
-   :set-known (unsafe) :set-trans (setf %funcallable-instance-function))
+  #!-x86
+  (fun
+   :ref-known (flushable) :ref-trans %funcallable-instance-fun
+   :set-known (unsafe) :set-trans (setf %funcallable-instance-fun))
   #!+x86
-  (function
-   :ref-known (flushable) :ref-trans %funcallable-instance-function
+  (fun
+   :ref-known (flushable) :ref-trans %funcallable-instance-fun
    ;; 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
+   ;; DEFKNOWN for (SETF %FUNCALLABLE-INSTANCE-FUN), and a weird
+   ;; unexplained DEFTRANSFORM from (SETF %SIMPLE-FUN-INSTANCE-FUN)
+   ;; into (SETF %SIMPLE-FUN-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
+   ;; 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