RFC: Non-indirect-dispatch and failed loading of classes
Andrew Haley
aph@redhat.com
Thu Sep 8 15:39:00 GMT 2005
Ranjit Mathew writes:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andrew Haley wrote:
> > Ranjit Mathew writes:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Hi,
> > >
> > > Consider the following:
> > >
> > > Foo.java:
> > > class Foo { }
> > >
> > > Bar.java:
> > > class Bar extends Foo { }
> > >
> > > Compile both to bytecode and then remove Foo.*. Now try to
> > > compile Bar.class to object code (non-indirect-dispatch).
> > > We get an internal error with current mainline.
> >
> > We should get a class not found error.
>
> We do get an error, but it's not a fatal error and we die
> later trying to lay out this class:
OK, I see. The traditional way to fix things is to use
error_mark_node, but it leads to uglified code with checks everywhere.
I'm not sure how best to fix this one, but I'd try leaving
layout_class_methods early, and if that doesn't work terminating the
compilation.
Andrew.
More information about the Java
mailing list