bug-report

Per Bothner per@bothner.com
Sun Aug 6 18:49:00 GMT 2000


ygrats@gmx.net writes:

> kawa fails to load/compile the portable regular expressions by dorai
> sitaram.
> (see http://www.cs.rice.edu/~dorai/pregexp/pregexp.html ,
>  http://www.cs.rice.edu/~dorai/pregexp/pregexp.tar.gz )
> 
> ==>
> (load "pregex.scm")
> java.lang.Error: attempting to push dead variable
> 	at gnu.bytecode.CodeAttr.emitLoad(CodeAttr.java:812)


The following patch seems to fix the problem.

Index: ApplyExp.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/ApplyExp.java,v
retrieving revision 1.27
diff -u -r1.27 ApplyExp.java
--- ApplyExp.java	2000/05/09 23:00:27	1.27
+++ ApplyExp.java	2000/08/07 01:48:10
@@ -211,10 +211,8 @@
 		  extraArg = 1;
 		if (comp.curLambda == func_lambda)
 		  code.emitLoad(func_lambda.closureEnv);  // Recursive call.
-		else if (parent.heapFrame != null || parent.closureEnv == null)
-		  parent.loadHeapFrame(comp);
 		else
-		  code.emitLoad(parent.closureEnv);
+		  parent.loadHeapFrame(comp);
 	      }
 
 	    boolean varArgs = func_lambda.restArgType() != null;
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/


More information about the Kawa mailing list