1.0.27.4: x86/x86-64 REP prefix has the same code as REPE (not REPNE)
[sbcl.git] / src / compiler / globaldb.lisp
index bb75e15..7930502 100644 (file)
 ;;; where this information came from:
 ;;;    :ASSUMED  = from uses of the object
 ;;;    :DEFINED  = from examination of the definition
+;;;    :DEFINED-METHOD = implicit, incremental declaration by CLOS.
 ;;;    :DECLARED = from a declaration
-;;; :DEFINED trumps :ASSUMED, and :DECLARED trumps :DEFINED.
+;;; :DEFINED trumps :ASSUMED, :DEFINED-METHOD trumps :DEFINED,
+;;; and :DECLARED trumps :DEFINED-METHOD.
 ;;; :DEFINED and :ASSUMED are useful for issuing compile-time warnings,
-;;; and :DECLARED is useful for ANSIly specializing code which
-;;; implements the function, or which uses the function's return values.
+;;; :DEFINED-METHOD and :DECLARED are useful for ANSIly specializing
+;;; code which implements the function, or which uses the function's
+;;; return values.
 (define-info-type
   :class :function
   :type :where-from
-  :type-spec (member :declared :assumed :defined)
+  :type-spec (member :declared :defined-method :assumed :defined)
   :default
   ;; Again (as in DEFINE-INFO-TYPE :CLASS :FUNCTION :TYPE :KIND) it's
   ;; not clear how to generalize the FBOUNDP expression to the
   :class :variable
   :type :kind
   :type-spec (member :special :constant :macro :global :alien)
-  :default (if (symbol-self-evaluating-p name)
+  :default (if (typep name '(or boolean keyword))
                :constant
                :global))
 
   :type-spec (member :declared :assumed :defined)
   :default :assumed)
 
-;;; the Lisp object which is the value of this constant, if known
+;;; We only need a mechanism different from the
+;;; usual SYMBOL-VALUE for the cross compiler.
+#+sb-xc-host
 (define-info-type
   :class :variable
-  :type :constant-value
+  :type :xc-constant-value
   :type-spec t
-  ;; CMU CL used to return two values for (INFO :VARIABLE :CONSTANT-VALUE ..).
-  ;; Now we don't: it was the last remaining multiple-value return from
-  ;; the INFO system, and bringing it down to one value lets us simplify
-  ;; things, especially simplifying the declaration of return types.
-  ;; Software which used to check the second value (for "is it defined
-  ;; as a constant?") should check (EQL (INFO :VARIABLE :KIND ..) :CONSTANT)
-  ;; instead.
-  :default (if (symbol-self-evaluating-p name)
-               name
-               (bug "constant lookup of nonconstant ~S" name)))
+  :default nil)
 
 ;;; the macro-expansion for symbol-macros
 (define-info-type
   :default (let ((class (find-classoid name nil)))
              (when class (classoid-layout class))))
 
+;;; DEFTYPE lambda-list
+(define-info-type
+   :class :type
+   :type :lambda-list
+   :type-spec list
+   :default nil)
+
+(define-info-type
+   :class :type
+   :type :source-location
+   :type-spec t
+   :default nil)
+
 (define-info-class :typed-structure)
 (define-info-type
   :class :typed-structure