This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fluid-let problem


Wen-Chun Ni wrote:

#|kawa:1|# (define x 1)
#|kawa:2|# (define (f y) (+ x y))
#|kawa:3|# (f 1)
2
#|kawa:4|# (fluid-let ((x 2)) (f 1))
java.lang.Error: popType called with empty stack
Thanks for a nice simple test-case.  I checked in the
attached patch.
--
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/
Index: FindTailCalls.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/FindTailCalls.java,v
retrieving revision 1.25
diff -u -r1.25 FindTailCalls.java
--- FindTailCalls.java	26 Sep 2002 21:46:18 -0000	1.25
+++ FindTailCalls.java	10 Nov 2002 21:40:20 -0000
@@ -92,7 +92,16 @@
         decl.setCanRead(true);
         decl.setCanWrite(true);
       }
-    return super.walkFluidLetExp(exp);
+    boolean save = inTailContext;
+    inTailContext = false;
+    try
+      {
+	return super.walkFluidLetExp(exp);
+      }
+    finally
+      {
+	inTailContext = save;
+      }
   }
 
   protected Expression walkLetExp (LetExp exp)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]