Fix bug in canonicalize/lambda. Lambda expressions that need the
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 24 Mar 1993 02:44:26 +0000 (02:44 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 24 Mar 1993 02:44:26 +0000 (02:44 +0000)
binding of #[environment] cannot be compiled separately.

v7/src/compiler/fggen/canon.scm

index f9a03acf89263d2b7a922043961bf433ebf6a74b..06c1459a6417a0bcb5500ef2fa3453199da43800 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: canon.scm,v 1.14 1993/03/10 02:36:21 gjr Exp $
+$Id: canon.scm,v 1.15 1993/03/24 02:44:26 gjr Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -322,9 +322,10 @@ ARBITRARY: The expression may be executed more than once.  It
         (canonicalize/lambda* expr bound (if (eq? context 'FIRST-CLASS)
                                              'FIRST-CLASS
                                              'ARBITRARY))))
-    (if (not (and (eq? context 'TOP-LEVEL)
-                 (canout-safe? canout)
-                 compiler:compile-by-procedures?))
+    (if (or (not (eq? context 'TOP-LEVEL))
+           (not (canout-safe? canout))
+           (canout-needs? canout)
+           (not compiler:compile-by-procedures?))
        canout
        (make-canout
         (scode/make-directive