This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: interface dispatch
- To: Godmar Back <gback at cs dot utah dot edu>
- Subject: Re: interface dispatch
- From: Per Bothner <per at bothner dot com>
- Date: 23 Oct 1999 11:23:12 -0700
- Cc: java-discuss at sourceware dot cygnus dot com
- References: <199910220443.WAA24830@faith.cs.utah.edu>
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/