This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Tail sets
- From: Helmut Eller <eller dot helmut at gmail dot com>
- To: kawa at sources dot redhat dot com
- Date: Thu, 02 Jul 2009 20:31:06 +0200
- Subject: Re: Tail sets
- References: <87zlfnjhwt.fsf@lifebook.lan> <49BDDA63.6020009@bothner.com> <m2my9fpvm8.fsf@gmail.com> <4A4868D7.2020602@bothner.com> <m2vdmfibic.fsf@gmail.com>
* Helmut Eller [2009-06-29 12:23+0200] writes:
> Presumably because this requires now very long jumps.
... or not. Anyway the change below fixes the problem enough to let the
compilation finish:
Index: CodeAttr.java
===================================================================
--- CodeAttr.java (revision 6276)
+++ CodeAttr.java (working copy)
@@ -1872,10 +1872,17 @@
= if_stack.start_stack_size + if_stack.stack_growth;
if (! reachableHere ())
{
- if (if_stack.stack_growth > 0)
- System.arraycopy (if_stack.then_stacked_types, 0,
- stack_types, if_stack.start_stack_size,
- if_stack.stack_growth);
+ if (if_stack.stack_growth > 0) {
+ while (stack_types.length < then_clause_stack_size) {
+ Type[] new_array = new Type[2 * stack_types.length + 1];
+ System.arraycopy (stack_types, 0, new_array, 0,
+ stack_types.length);
+ stack_types = new_array;
+ }
+ System.arraycopy (if_stack.then_stacked_types, 0,
+ stack_types, if_stack.start_stack_size,
+ if_stack.stack_growth);
+ }
SP = then_clause_stack_size;
}
else if (SP != then_clause_stack_size)