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: Problem with primitive-throw?


Dominique Boucher wrote:

java.lang.Error: popType called with empty stack
test.apply(gnu.mapping.CallContext)void
        at gnu.bytecode.CodeAttr.popType(CodeAttr.java:207)
        at gnu.bytecode.CodeAttr.emitStore(CodeAttr.java:1072)
        at gnu.bytecode.CodeAttr.emitTryEnd(CodeAttr.java:1876)

I checked in the attached patch. -- --Per Bothner per@bothner.com http://per.bothner.com/

Index: CodeAttr.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/bytecode/CodeAttr.java,v
retrieving revision 1.66
diff -u -r1.66 CodeAttr.java
--- CodeAttr.java	3 Feb 2004 19:41:47 -0000	1.66
+++ CodeAttr.java	20 Feb 2004 19:05:01 -0000
@@ -1,4 +1,4 @@
-// Copyright (c) 1997, 1998, 1999, 2001, 2003  Per M.A. Bothner.
+// Copyright (c) 1997, 1998, 1999, 2001, 2003, 2004  Per M.A. Bothner.
 // This is free software;  for terms and warranty disclaimer see ./COPYING.
 
 package gnu.bytecode;
@@ -1872,7 +1872,7 @@
   {
     if (try_stack.end_label == null)
       {
-	if (try_stack.saved_result != null)
+	if (try_stack.saved_result != null && reachableHere())
 	  emitStore(try_stack.saved_result);
 	try_stack.end_label = new Label(this);
 	if (reachableHere())

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