This is the mail archive of the java@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: CNI changes (Was: Binary Compatibility)


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

Andrew> Well, I guess it does save memory.  However, the last time I looked
Andrew> there was some fairly nasty hacking in the C++ front end to make this
Andrew> work.  I'll ask Jason if we can have thaht code in a common place.

We could try to approach the problem in a different way.  C++, as I
understand it, just builds subclasses that look like:

    struct subclass {
       char padding[sizeof(superclass)];
       my fields;
    }

That's pretty ugly.  When I looked into this (last time we talked
about it), I thought that stor-layout.c:finalize_type_size() was
rounding up each class' size, and that if we added a new hook to let
us skip this, we would be ok.  I never tested this theory though.
Maybe it isn't that easy; stuff in gcc rarely is.

Tom


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