Skip to content
Snippets Groups Projects
globaldb.lisp 37.7 KiB
Newer Older
wlott's avatar
wlott committed
;;; Lambda used for inline expansion of this function.
(define-info-type function inline-expansion list)

;;; Specifies whether this function may be expanded inline.  If null, we
;;; don't care.
(define-info-type function inlinep inlinep nil)

;;; A macro-like function which transforms a call to this function into some
;;; other Lisp form.  This expansion is inhibited if inline expansion is
;;; inhibited.
(define-info-type function source-transform (or function null list))
wlott's avatar
wlott committed

;;; The macroexpansion function for this macro.
(define-info-type function macro-function (or function null list)
wlott's avatar
wlott committed
  nil)

;;; A function which converts this special form into IR1.
(define-info-type function ir1-convert (or function null list))
wlott's avatar
wlott committed

;;; A function which gets a chance to do stuff to the IR1 for any call to this
;;; function.
(define-info-type function ir1-transform (or function null list))
wlott's avatar
wlott committed

;;; If a function is a defstruct slot accessor or setter, then this is the
;;; defstruct-definition for the structure that it belongs to.
(define-info-type function accessor-for (or defstruct-description null)
  nil)

;;; If a function is "known" to the compiler, then this is FUNCTION-INFO
;;; structure containing the info used to special-case compilation.
(define-info-type function info (or function-info null) nil)

(define-info-type function documentation (or string null) nil)

wlott's avatar
wlott committed
); defun function-info-init

#|
  Other:
    Documentation?
|#

;;;; Definitions for other random information.

(defun other-info-init ()

(define-info-class variable)

;;; The kind of variable-like thing described.
(define-info-type variable kind (member :special :constant :global :alien)
wlott's avatar
wlott committed
  (if (or (eq (symbol-package name) (symbol-package :end))
	  (member name '(t nil)))
      :constant
      :global))

;;; The declared type for this variable.
(define-info-type variable type ctype *universal-type*)

;;; Where this type and kind information came from.
(define-info-type variable where-from (member :declared :assumed :defined)
  :assumed)

;;; The the lisp object which is the value of this constant, if known.
(define-info-type variable constant-value t
  (if (boundp name)
      (values (symbol-value name) t)
      (values nil nil)))

(define-info-type variable alien-info (or heap-alien-info null) nil)
wlott's avatar
wlott committed

(define-info-type variable documentation (or string null) nil)

wlott's avatar
wlott committed
(define-info-class type)

;;; The kind of type described.  We return :Structure for standard types that
;;; are implemented as structures.
;;;
(define-info-type type kind (member :primitive :defined :structure nil)
  (if (or (info type builtin name)
	  (info type translator name))
wlott's avatar
wlott committed
      :primitive
      nil))

;;; Expander function for a defined type.
(define-info-type type expander (or function null list) nil)
wlott's avatar
wlott committed

;;; Print function for a type.
(define-info-type type printer (or function symbol null list) nil)
;;; Make-load-form function for a type.
(define-info-type type load-form-maker (or function symbol null) nil)

;;; Defstruct description information for a structure type.  DEFINED is the
;;; current global definition, and is not shadowed by compilation of
;;; structure definitions.
;;;
wlott's avatar
wlott committed
(define-info-type type structure-info (or defstruct-description null) nil)
(define-info-type type defined-structure-info (or defstruct-description null)
  nil)
wlott's avatar
wlott committed

;;; True if this type has been frozen with the FREEZE-TYPE declaration.  Only
;;; interesting for structure types.
;;;
(define-info-type type frozen boolean nil)

(define-info-type type documentation (or string null))

;;; Function that parses type specifiers into CTYPE structures.
;;;
(define-info-type type translator (or function null list) nil)

;;; If true, then the type coresponding to this name.
;;;
(define-info-type type builtin (or ctype null) nil)


wlott's avatar
wlott committed
(define-info-class declaration)
(define-info-type declaration recognized boolean)

(define-info-class alien-type)
(define-info-type alien-type kind (member :primitive :defined :unknown)
  :unknown)
(define-info-type alien-type translator (or function null) nil)
(define-info-type alien-type definition (or alien-type null) nil)
(define-info-type alien-type struct (or alien-type null) nil)
(define-info-type alien-type union (or alien-type null) nil)
(define-info-type alien-type enum (or alien-type null) nil)
wlott's avatar
wlott committed

(define-info-class setf)

(define-info-type setf inverse (or symbol null) nil)

(define-info-type setf documentation (or string null) nil)

(define-info-type setf expander (or function null list) nil)
wlott's avatar
wlott committed

;;; Used for storing random documentation types.  The stuff is an alist
;;; translating documentation kinds to values.
;;;
(define-info-class random-documentation)
(define-info-type random-documentation stuff list ())

wlott's avatar
wlott committed
); defun other-info-init