Java: fixes for -fno-assume-compiled
Jeff Sturm
jsturm@one-point.com
Thu Dec 19 14:09:00 GMT 2002
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
More information about the Gcc-patches
mailing list