Update of /cvsroot/sbcl/sbcl/src/compiler
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27209/src/compiler
Modified Files:
ir1tran.lisp ir1util.lisp
Log Message:
1.0.17.6: fix bug introduced by 1.0.7.3
* 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.
Index: ir1tran.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/ir1tran.lisp,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- ir1tran.lisp 28 May 2008 16:23:13 -0000 1.157
+++ ir1tran.lisp 29 May 2008 11:16:53 -0000 1.158
@@ -518,20 +518,16 @@
(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: ir1util.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/ir1util.lisp,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- ir1util.lisp 28 May 2008 16:23:13 -0000 1.114
+++ ir1util.lisp 29 May 2008 11:16:53 -0000 1.115
@@ -1568,9 +1568,13 @@
;;; 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)
|