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: Patch: RFC: alignment fix in resolve.cc


Andrew> I think you've got it back to front.  All that the new code does is
Andrew> fix things so that CNI code is compliant with what gcj has always
Andrew> done.  clz->superclass->size() should already take this into account.

Thanks.

Andrew> The Right Thing to do is always to pad the size of a class so that its
Andrew> size is an integer multiple of its alignment.  As long as that's done
Andrew> everything will be fine, and the extra padding is already there.

Ok, I think we don't do this.  After we add the last field we don't do
any rounding of `instance_size', which we then use as the class's
size.

So it looks like either my patch or a different one (it would be
simpler to round before assigning to clz->size_in_bytes) is still
needed.  I'll see if I can come up with an example.

Tom


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