Fix bug in rtl-common which introduced a bound-variable conflict if a
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 1 Jul 1993 03:09:43 +0000 (03:09 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 1 Jul 1993 03:09:43 +0000 (03:09 +0000)
slot has the same as the item being defined.

v7/src/compiler/base/macros.scm

index 3de99b35cf36885d1b99dd87ce2fc284b524904f..db5b5bdc195f088f536a2d58da141b172fddab52 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Id: macros.scm,v 4.12 1992/10/19 19:11:17 jinx Exp $
+$Id: macros.scm,v 4.13 1993/07/01 03:09:43 gjr Exp $
 
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -236,9 +236,14 @@ MIT in each case. |#
                           (name (symbol-append type '- slot)))
                      `((DEFINE-INTEGRABLE (,(symbol-append 'RTL: name) ,type)
                          (GENERAL-CAR-CDR ,type ,ref-index))
-                       (DEFINE-INTEGRABLE (,(symbol-append 'RTL:SET- name '!)
-                                           ,type ,slot)
-                         (SET-CAR! (GENERAL-CAR-CDR ,type ,set-index) ,slot))
+                       ,(let ((slot (if (eq? slot type)
+                                        (symbol-append slot '-VALUE)
+                                        slot)))
+                          `(DEFINE-INTEGRABLE
+                             (,(symbol-append 'RTL:SET- name '!)
+                              ,type ,slot)
+                             (SET-CAR! (GENERAL-CAR-CDR ,type ,set-index)
+                                       ,slot)))
                        ,@(loop (cdr components)
                                (* ref-index 2)
                                (* set-index 2))))))))))