This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]