New C++ ABI: patches.

Tom Tromey tromey@redhat.com
Sun Jan 7 15:14:00 GMT 2001


Ok, my theory about updating NUM_OBJECT_METHODS was just wrong.  The
beauty of the current plan is that you *don't* have to update it.

However, I notice you added the new methods to Object.  I think they
need to be added to _JvObjectPrefix, before the finalize() method.
Otherwise they won't (I think -- you'd have to check) end up in the
right place in the vtable.

Also, suppose the user makes a virtual function named `nacd_1'.  This
is unlikely, I admit.  But won't this cause problems if the signatures
are different?

One approach is to do this:

    struct _JvObjectPrefix
    {
    protected:
       virtual void nacd_1 (void);
       virtual void nacd_2 (void);
    }

    class java::lang::Object : protected _JvObjectPrefix
    {
       ...
    }

In this case you have to remember to move finalize() from its position
in Object up to the top (order matters) and update the comment before
_JvObjectPrefix.

Tom


More information about the Gcc-patches mailing list