(let ((block-name (when env
(car (find-if #'car (sb!c::lexenv-blocks env))))))
(if block-name
- (gensym (format nil "~A[~S]" name block-name))
+ (gensym (format nil "~A[~A]" name block-name))
(gensym name))))
;; doubt such warnings are ANSI-compliant, but I'm not sure, so I've
;; written this in a way that CMU CL will tolerate and which ought to
;; work elsewhere too.) -- WHN 2001-03-24
- (eval `(defconstant ,name ',value))))
+ (eval `(defconstant ,name ',value)))
+ ;; It would certainly be awesome if this was only needed for symbols
+ ;; in CL. Unfortunately, that is not the case. Maybe some are moved
+ ;; back in CL later on?
+ (setf (info :variable :xc-constant-value name) value))
(setf (info :variable :kind name) :constant)
name)
:type-spec (member :declared :assumed :defined)
:default :assumed)
+;;; We only need a mechanism different from the
+;;; usual SYMBOL-VALUE for the cross compiler.
+#+sb-xc-host
+(define-info-type
+ :class :variable
+ :type :xc-constant-value
+ :type-spec t
+ :default nil)
+
;;; the macro-expansion for symbol-macros
(define-info-type
:class :variable
(type (type-specifier (info :variable :type name))))
`(macro . (the ,type ,expansion))))
(:constant
- (find-constant (symbol-value name) name))
+ (let ((value (symbol-value name)))
+ ;; Override the values of standard symbols in XC,
+ ;; since we can't redefine them.
+ #+sb-xc-host
+ (when (eql (find-symbol (symbol-name name) :cl) name)
+ (multiple-value-bind (xc-value foundp)
+ (info :variable :xc-constant-value name)
+ (cond (foundp
+ (setf value xc-value))
+ ((not (eq value name))
+ (compiler-warn
+ "Using cross-compilation host's definition of ~S: ~A~%"
+ name (symbol-value name))))))
+ (find-constant value name)))
(t
(make-global-var :kind kind
:%source-name name
(def!struct (constant (:constructor make-constant (value
&aux
(type (ctype-of value))
- (%source-name '.anonynous.)
+ (%source-name '.anonymous.)
(where-from :defined)))
(:include leaf))
;; the value of the constant
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.17.34"
+"1.0.17.35"