From 48bdb65c211e3752c1628e91a87a65752490d4aa Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Mon, 25 Nov 1991 12:56:07 +0000
Subject: [PATCH] If we see a reference to a named constant that isn't a number
 or charcter, then convert it as SYMBOL-FUNCTION.

---
 compiler/ir2tran.lisp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/compiler/ir2tran.lisp b/compiler/ir2tran.lisp
index a4364f192..5e81b64f2 100644
--- a/compiler/ir2tran.lisp
+++ b/compiler/ir2tran.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir2tran.lisp,v 1.33 1991/11/09 22:08:58 ram Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir2tran.lisp,v 1.34 1991/11/25 12:56:07 ram Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -161,7 +161,13 @@
 	     (vop value-cell-ref node block tn res)
 	     (emit-move node block tn res))))
       (constant
-       (emit-move node block (constant-tn leaf) res))
+       (if (and name
+		(not (typep (constant-value leaf) '(or number character))))
+	   (let ((name-tn (emit-constant name)))
+	     (if (policy node (zerop safety))
+		 (vop fast-symbol-value node block name-tn res)
+		 (vop symbol-value node block name-tn res)))
+	   (emit-move node block (constant-tn leaf) res)))
       (functional
        (ir2-convert-closure node block leaf res))
       (global-var
-- 
GitLab