1.0.43.82: Make compiling a MAKE-ARRAY call with a bad keyword list signal warning
[sbcl.git] / src / compiler / constantp.lisp
index 85bb5b8..1468534 100644 (file)
                   form)))
     (typecase form
       (symbol
-       (symbol-value form))
+       ;; KLUDGE: superficially, this might look good enough: we grab
+       ;; the value from the info database, and if it isn't there (or
+       ;; is NIL, but hey) we use the host's value.  This works for
+       ;; MOST-POSITIVE-FIXNUM and friends, but still fails for
+       ;; float-related constants, where there is in fact no guarantee
+       ;; that we can represent our target value at all in the host,
+       ;; so we don't try.  We should rework all uses of floating
+       ;; point so that we never try to use a host's value, and then
+       ;; make some kind of assertion that we never attempt to take
+       ;; a host value of a constant in the CL package.
+       #+sb-xc-host (or (info :variable :xc-constant-value form)
+                        (symbol-value form))
+       #-sb-xc-host (symbol-value form))
       (list
        (if (special-operator-p (car form))
            (constant-special-form-value form environment envp)