This is the mail archive of the java-discuss@sources.redhat.com 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]

Re: New C++ ABI: patches.


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

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