field.h (struct _Jv_Field): Use "jshort" as type for nameIndex.
* gcj/field.h (struct _Jv_Field): Use "jshort" as type for nameIndex. Use "jint" as type for boffset. * java/lang/Class.h (struct _Jv_Method): Made accflags a _Jv_ushort. (Class): Likewise. Also changed type of method_count, vtable_method_count, size_in_bytes, field_count, static_field_count, interface_count. * gcj/array.h (__JArray): Made `length' a const jsize, not an int. From-SVN: r31621
This commit is contained in:
parent
7554ad67e5
commit
0507a9b19f
3 changed files with 13 additions and 11 deletions
|
@ -18,7 +18,9 @@ extern "Java" {
|
||||||
class __JArray : public java::lang::Object
|
class __JArray : public java::lang::Object
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int length;
|
// FIXME: we'd like this to be `const' but that causes problems with
|
||||||
|
// the C++ compiler.
|
||||||
|
jsize length;
|
||||||
friend jsize JvGetArrayLength (__JArray*);
|
friend jsize JvGetArrayLength (__JArray*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -30,13 +30,13 @@ struct _Jv_Field
|
||||||
_Jv_ushort flags;
|
_Jv_ushort flags;
|
||||||
|
|
||||||
#ifdef COMPACT_FIELDS
|
#ifdef COMPACT_FIELDS
|
||||||
short nameIndex; /* offset in class's name table */
|
jshort nameIndex; /* offset in class's name table */
|
||||||
#else
|
#else
|
||||||
_Jv_ushort bsize; /* not really needed ... */
|
_Jv_ushort bsize; /* not really needed ... */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
union {
|
union {
|
||||||
int boffset; /* offset in bytes for instance field */
|
jint boffset; /* offset in bytes for instance field */
|
||||||
void* addr; /* address of static field */
|
void* addr; /* address of static field */
|
||||||
} u;
|
} u;
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct _Jv_Method
|
||||||
{
|
{
|
||||||
_Jv_Utf8Const *name;
|
_Jv_Utf8Const *name;
|
||||||
_Jv_Utf8Const *signature;
|
_Jv_Utf8Const *signature;
|
||||||
unsigned short accflags;
|
_Jv_ushort accflags;
|
||||||
void *ncode;
|
void *ncode;
|
||||||
|
|
||||||
_Jv_Method *getNextMethod ()
|
_Jv_Method *getNextMethod ()
|
||||||
|
@ -229,7 +229,7 @@ private:
|
||||||
// Name of class.
|
// Name of class.
|
||||||
_Jv_Utf8Const *name;
|
_Jv_Utf8Const *name;
|
||||||
// Access flags for class.
|
// Access flags for class.
|
||||||
unsigned short accflags;
|
_Jv_ushort accflags;
|
||||||
// The superclass, or null for Object.
|
// The superclass, or null for Object.
|
||||||
jclass superclass;
|
jclass superclass;
|
||||||
// Class constants.
|
// Class constants.
|
||||||
|
@ -240,17 +240,17 @@ private:
|
||||||
_Jv_Method *methods;
|
_Jv_Method *methods;
|
||||||
// Number of methods. If this class is primitive, this holds the
|
// Number of methods. If this class is primitive, this holds the
|
||||||
// character used to represent this type in a signature.
|
// character used to represent this type in a signature.
|
||||||
short method_count;
|
jshort method_count;
|
||||||
// Number of methods in the vtable.
|
// Number of methods in the vtable.
|
||||||
short vtable_method_count;
|
jshort vtable_method_count;
|
||||||
// The fields.
|
// The fields.
|
||||||
_Jv_Field *fields;
|
_Jv_Field *fields;
|
||||||
// Size of instance fields, in bytes.
|
// Size of instance fields, in bytes.
|
||||||
int size_in_bytes;
|
jint size_in_bytes;
|
||||||
// Total number of fields (instance and static).
|
// Total number of fields (instance and static).
|
||||||
short field_count;
|
jshort field_count;
|
||||||
// Number of static fields.
|
// Number of static fields.
|
||||||
short static_field_count;
|
jshort static_field_count;
|
||||||
// The vtbl for all objects of this class.
|
// The vtbl for all objects of this class.
|
||||||
_Jv_VTable *vtable;
|
_Jv_VTable *vtable;
|
||||||
// Interfaces implemented by this class.
|
// Interfaces implemented by this class.
|
||||||
|
@ -258,7 +258,7 @@ private:
|
||||||
// The class loader for this class.
|
// The class loader for this class.
|
||||||
java::lang::ClassLoader *loader;
|
java::lang::ClassLoader *loader;
|
||||||
// Number of interfaces.
|
// Number of interfaces.
|
||||||
short interface_count;
|
jshort interface_count;
|
||||||
// State of this class.
|
// State of this class.
|
||||||
jbyte state;
|
jbyte state;
|
||||||
// The thread which has locked this class. Used during class
|
// The thread which has locked this class. Used during class
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue