1.0.17.6: fix bug introduced by 1.0.7.3
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 29 May 2008 11:16:52 +0000 (11:16 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 29 May 2008 11:16:52 +0000 (11:16 +0000)
 * References to named constants now need MAYBE-EMIT-LOAD-FORM as well
   -- so we may just as well move it to FIND-CONSTANT.

 * Test-case, adepted from Swank.

src/compiler/ir1tran.lisp
src/compiler/ir1util.lisp
tests/compiler.test.sh
version.lisp-expr

index 0caaac5..6f08a8b 100644 (file)
     (values))
 
   ;; Generate a reference to a manifest constant, creating a new leaf
-  ;; if necessary. If we are producing a fasl file, make sure that
-  ;; MAKE-LOAD-FORM gets used on any parts of the constant that it
-  ;; needs to be.
+  ;; if necessary.
   (defun reference-constant (start next result value)
     (declare (type ctran start next)
              (type (or lvar null) result))
     (ir1-error-bailout (start next result value)
-     (when (producing-fasl-file)
-       (maybe-emit-make-load-forms value))
-     (let* ((leaf (find-constant value))
-            (res (make-ref leaf)))
-       (push res (leaf-refs leaf))
-       (link-node-to-previous-ctran res start)
-       (use-continuation res next result)))
+      (let* ((leaf (find-constant value))
+             (res (make-ref leaf)))
+        (push res (leaf-refs leaf))
+        (link-node-to-previous-ctran res start)
+        (use-continuation res next result)))
     (values)))
 
 ;;; Add FUNCTIONAL to the COMPONENT-REANALYZE-FUNCTIONALS, unless it's
index 3596ec2..29fa7cd 100644 (file)
 
 ;;; Return a LEAF which represents the specified constant object. If
 ;;; the object is not in *CONSTANTS*, then we create a new constant
-;;; LEAF and enter it.
+;;; LEAF and enter it. If we are producing a fasl file, make sure that
+;;; MAKE-LOAD-FORM gets used on any parts of the constant that it
+;;; needs to be.
 (defun find-constant (object)
   (flet ((make-it ()
+           (when (producing-fasl-file)
+             (maybe-emit-make-load-forms object))
            (make-constant :value object
                           :%source-name '.anonymous.
                           :type (ctype-of object)
index 548f9ee..5679935 100644 (file)
@@ -384,5 +384,12 @@ cat > $tmpfilename <<EOF
 EOF
 expect_clean_cload $tmpfilename
 
+cat > $tmpfilename <<EOF
+(defconstant cl-package (find-package :cl))
+(defun cl-symbol-p (x)
+  (eq (symbol-package x) cl-package))
+EOF
+expect_clean_cload $tmpfilename
+
 # success
 exit $EXIT_TEST_WIN
index 918adb0..15686ab 100644 (file)
@@ -17,4 +17,4 @@
 ;;; 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.5"
+"1.0.17.6"