Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
(specifier-type
(%primitive header-ref entry %function-entry-type-slot))))
(specifier-type 'function))
#-new-compiler
(specifier-type 'function))
;;; The Assumed-Type for this function, if we have to infer the type due to not
;;; having a declaration or definition.
(define-info-type function assumed-type (or approximate-function-type null))
;;; Where this information came from:
;;; :declared, from a declaration.
;;; :assumed, from uses of the object.
;;; :defined, from examination of the definition.
(define-info-type function where-from (member :declared :assumed :defined)
#+new-compiler
(if (fboundp name) :defined :assumed)
#-new-compiler
:assumed)
;;; 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
#-new-compiler list))
(define-info-type function macro-function (or function null
#-new-compiler list)
nil)
;;; A function which converts this special form into IR1.
(define-info-type function ir1-convert (or function null
#-new-compiler list))
;;; 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
#-new-compiler list))
;;; If a function is an alien-operator, then this is the Alien-Info.
(define-info-type function alien-operator (or lisp::alien-info null) nil)
;;; 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)
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
); 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)
#+new-compiler
(if (or (eq (symbol-package name) (symbol-package :end))
(member name '(t nil)))
:constant
:global)
#-new-compiler
(if (constantp name)
: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
#+new-compiler
(if (boundp name)
(values (symbol-value name) t)
(values nil nil))
#-new-compiler
(if (constantp name)
(values (symbol-value name) t)
(values nil nil)))
(define-info-type variable alien-value (or lisp::ct-a-val null) nil)
(define-info-type variable documentation (or string null) nil)
(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 (member name type-specifier-symbols)
:primitive
nil))
;;; Expander function for a defined type.
(define-info-type type expander (or function null
#-new-compiler list) nil)
;;; Print function for a type.
(define-info-type type printer (or function symbol null
#-new-compiler list) nil)
;;; Defstruct description information for a structure type. DEFINED is the
;;; current global definition, and is not shadowed by compilation of
;;; structure definitions.
;;;
(define-info-type type structure-info (or defstruct-description null) nil)
(define-info-type type defined-structure-info (or defstruct-description null)
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)
(define-info-class declaration)
(define-info-type declaration recognized boolean)
(define-info-class alien-stack)
(define-info-type alien-stack info (or lisp::stack-info null) nil)
(define-info-class enumeration)
(define-info-type enumeration info (or lisp::enumeration-info null) nil)
(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
#-new-compiler list) nil)
;;; 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 ())