Class.h (_Jv_IDispatchTable): Make it a struct.
2006-02-09 Bryce McKinlay <mckinlay@redhat.com> * java/lang/Class.h (_Jv_IDispatchTable): Make it a struct. Put 'itable' inline, instead of as a pointer. (java::lang::Class): Put 'idt' in anonymous union with 'ioffsets'. * link.cc (null_idt): Update definition. (_Jv_Linker::prepare_constant_time_tables): Allocate klass->idt as a single struct. Use _Jv_AllocBytes, not _Jv_AllocRawObj. (_Jv_Linker::generate_itable): Update to use 'ioffsets'. (_Jv_Linker::find_iindex): Likewise. Update comment. * java/lang/natClass.cc (_Jv_LookupInterfaceMethodIdx): Update for _Jv_IDispatchTable change. (_Jv_IsAssignableFrom): Likewise. From-SVN: r110818
This commit is contained in:
parent
c4bbc10564
commit
a286e145de
4 changed files with 57 additions and 53 deletions
|
@ -120,23 +120,14 @@ struct _Jv_Method
|
|||
{ return this + 1; }
|
||||
};
|
||||
|
||||
// Interface Dispatch Tables
|
||||
union _Jv_IDispatchTable
|
||||
// The table used to resolve interface calls.
|
||||
struct _Jv_IDispatchTable
|
||||
{
|
||||
struct
|
||||
{
|
||||
// Index into interface's ioffsets.
|
||||
jshort iindex;
|
||||
jshort itable_length;
|
||||
// Class Interface dispatch table.
|
||||
void **itable;
|
||||
} cls;
|
||||
|
||||
struct
|
||||
{
|
||||
// Offsets into implementation class itables.
|
||||
jshort *ioffsets;
|
||||
} iface;
|
||||
// Index into interface's ioffsets.
|
||||
jshort iindex;
|
||||
jshort itable_length;
|
||||
// Class Interface dispatch table.
|
||||
void *itable[0];
|
||||
};
|
||||
|
||||
// Used by _Jv_Linker::get_interfaces ()
|
||||
|
@ -600,8 +591,13 @@ private:
|
|||
jshort depth;
|
||||
// Vector of this class's superclasses, ordered by decreasing depth.
|
||||
jclass *ancestors;
|
||||
// Interface Dispatch Table.
|
||||
_Jv_IDispatchTable *idt;
|
||||
// In a regular class, this field points to the Class Interface Dispatch
|
||||
// Table. In an interface, it points to the ioffsets table.
|
||||
union
|
||||
{
|
||||
_Jv_IDispatchTable *idt;
|
||||
jshort *ioffsets;
|
||||
};
|
||||
// Pointer to the class that represents an array of this class.
|
||||
jclass arrayclass;
|
||||
// Security Domain to which this class belongs (or null).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue