RFC: Non-indirect-dispatch and failed loading of classes

Ranjit Mathew rmathew@gmail.com
Thu Sep 8 13:28:00 GMT 2005


-----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.

In this change:

http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jcf-parse.c.diff?r1=1.158&r2=1.158.4.1

load_class() sets TYPE_DUMMY for a RECORD_TYPE if we failed to
load it, but that bit is effected only for non-indirect-dispatch.

Is there a reason we can't make this independent of indirect-dispatch?

Or would it be better to make load_class() return a success/failure
code so that callers know not to bother with the class if it couldn't
be loaded?

Thanks,
Ranjit.

PS: This is related to PR java/20031.

- --
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://ranjitmathew.hostingzero.com/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDIDs2Yb1hx2wRS48RAg/zAKCj/H0x4Rj+CgebwxKRR13xVFaDzwCfSKqq
nvAOTSjyHSEoag2Yl1GrQGQ=
=7SeO
-----END PGP SIGNATURE-----



More information about the Java mailing list