X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fconstantp.lisp;h=1468534d79393e5ccbfb12855cbb359d97a29def;hb=930a0e019b4c823da04d52e907d322a296fb9ae3;hp=85bb5b8f5f9f6037e31ab0446270875584d4831a;hpb=faafcfc8d751c0f549f8d30ff2ea4bc7342a7329;p=sbcl.git diff --git a/src/compiler/constantp.lisp b/src/compiler/constantp.lisp index 85bb5b8..1468534 100644 --- a/src/compiler/constantp.lisp +++ b/src/compiler/constantp.lisp @@ -49,7 +49,19 @@ 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)