interface dispatch
Godmar Back
gback@cs.utah.edu
Sat Oct 23 17:29:00 GMT 1999
Oh, okay, I see, you could define
typedef struct {
Hjava_lang_Class *iface;
methodptr *meth[1];
} *partialiftable;
in this case too.
Thanks,
- Godmar
>> Godmar Back <gback@cs.utah.edu> writes:
>> > > #define CLASS_INSTANCEOF_INTERFACE(CL, IFACE) \
> > > (CLASS_IINDEX(CL) <= CLASS_IOFFSETS_LENGTH(IFACE) \
> > > && ({unsigned short __offset = CLASS_IOFFSETS(IFACE)[CLASS_IINDEX(CL)]; \
> > > __offset < CLASS_ITABLE_LENGTH(CL) \
> > > && CLASS_ITABLE(CL)[__offset]] == IFACE}))
> >
> > What I don't understand here is the "CLASS_ITABLE(CL)[__offset]] == IFACE"
>> I belive that should have been:
>> && CLASS_ITABLE(CL)[__offset][0] == IFACE}))
>> Note this part:
>> // Each superinterface of a class (i.e. each interface that the class
> // directly or indirectly implements) has a corresponding "Partial
> // Interface Dispatch Table" whose size is (number of methods + 1) words.
> // The first word is a pointer to the interface (i.e. the java.lang.Class
> // instance for that interface). The remaining words are pointers to the
> // actual methods that implement the methods declared in the interface,
> // in the order specified by the Interface Method Index of the previous
> // paragraph.
> --
> --Per Bothner
> per@bothner.com http://www.bothner.com/~per/
>
More information about the Java
mailing list