This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Java: fixes for -fno-assume-compiled
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org, <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 19 Dec 2002 17:09:12 -0500 (EST)
- Subject: Re: Java: fixes for -fno-assume-compiled
On 16 Dec 2002, Tom Tromey wrote:
> Jeff> + // If superclass looks like a constant pool entry,
> Jeff> + // resolve it now.
> Jeff> + if ((int) klass->superclass < pool->size)
> Jeff> + klass->superclass = pool->data[(int) klass->superclass].clazz;
>
> Yuck.
Yuck indeed.
> Both sides of the comparison should be unsigned, shouldn't they?
Yes, thanks.
> Could we add a flag somewhere instead?
Where? I don't think accflags is the right place. There is some
padding in the Class record if we decide to create a new member though.
Note that there should really be one flag for superclass and one per
interface, since is_compiled could return false for some or all of those.
Is there really much danger of a valid pointer that looks like a valid
constant pool index, i.e. smaller than pool->size?
Jeff