[kaffe] -O4 jit3 problem

Timothy Stack stack@cs.utah.edu
Fri, 7 Jun 2002 16:00:56 -0600 (MDT)


> 
> I wrote:
> > Tim wrote:
> > > What about using local labels in END_EXCEPTION_HANDLING?
> > 
> > Ah! That's probably exactly what is needed.  I was hoping there was
> > some GCC way of handling this.
> 
> Seems to work, too!

I had a little problem with:

static inline void 
vmExcept_setJNIFrame(VmExceptHandler* eh, const void* start, const void*
end)
{
	assert(eh);
	assert(start != 0);
	assert(start < end);

	eh->meth = VMEXCEPTHANDLER_KAFFEJNI_HANDLER;
	eh->frame.jni.start = start;
	eh->frame.jni.end = end;
}

in exception.h.  The "assert(start < end);" needs to be changed to
"assert(start <= end);" otherwise it will fail if there are no
instructions between the start_label and end_label.  Which seems to happen
with Kaffe_ExceptionOccurred() and if NEED_JNIREFS isn't defined...

> -Pat

tim