gij runs HelloWorld on PPC Linux
jeff.sturm@appnet.com
jeff.sturm@appnet.com
Sun Feb 11 13:06:00 GMT 2001
On 2001年2月11日, Mark Wielaard wrote:
> > gij Final
> >
> > (this returns the string "this should not happen" which is incorrect)
> Same here:
> $ gij Final
> This should not happen
>> > gij Primes
> >
> > (this seems to run in an infinite loop never printing any Primes)
> Although this class takes a while (more then 30 seconds) it does
> print primes and finishes eventually. (output attached)
Those results match mine on Alpha. The erroneous Final output is caused
by a bug in the interpreter. One possible fix is:
Index: interpret.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/interpret.cc,v
retrieving revision 1.22
diff -u -r1.22 interpret.cc
--- interpret.cc 2000年10月20日 23:25:57 1.22
+++ interpret.cc 2001年02月11日 21:00:08
@@ -684,7 +684,10 @@
{
// final methods do not appear in the vtable,
// if it does not appear in the superclass.
- fun = (void (*)()) rmeth->method->ncode;
+ if (sp[0].o)
+ fun = (void (*)()) rmeth->method->ncode;
+ else
+ throw new ::java::lang::NullPointerException;
}
else
{
More information about the Java
mailing list