Top-level lets do not have their arguments compiled in separate blocks
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 6 May 1991 22:36:48 +0000 (22:36 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 6 May 1991 22:36:48 +0000 (22:36 +0000)
when compiler:compile-by-procedures? is true.

v7/src/compiler/fggen/canon.scm

index 2921da7acacf565fb74f2264c1e137356abb4a21..e9fc5dc4e8eb2811db1fc4c28ca2d0c5e87e2648 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/fggen/canon.scm,v 1.8 1990/04/03 04:50:50 jinx Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/fggen/canon.scm,v 1.9 1991/05/06 22:36:48 jinx Exp $
 
-Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1988-1991 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -422,10 +422,17 @@ ARBITRARY:        The expression may be executed more than once.  It
                         (if (eq? context 'TOP-LEVEL)
                             'ONCE-ONLY
                             context))
-   (combine-list
-    (map (lambda (op)
-          (canonicalize/expression op bound context))
-        operands))))
+   (let ((process-arguments
+         (lambda ()
+           (combine-list
+            (map (lambda (op)
+                   (canonicalize/expression op bound context))
+                 operands)))))
+     (if (and compiler:compile-by-procedures?
+             (eq? context 'TOP-LEVEL))
+        (fluid-let ((compiler:compile-by-procedures? false))
+          (process-arguments))
+        (process-arguments)))))
 \f
 ;;;; Protect from further canonicalization