Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

jvalue Union Reference

#include <jvalue.h>


Detailed Description

Java aggregate type references for object definitions.

This union contains literally a grand union of all Java data types, including both primatives and references types for the purpose of allowing all object instance fields to be stored in object_instance_field_data as an array in an object table entry without special treatment. Static fields may be stored in this the same way in class_static_field_data of a class table entry. (All sub-integer primative data types are store inside of (jint) and cast in/out at runtime.)

The following types are are casts of _jint, thus:

                          jvalue v;     ... a composite value

                          jint     i;   ... integer primative

                          jbyte    b;   ... sub-integer primatives
                          jboolean z;
                          jshort   s;
                          jchar    c;

                          jfloat   f;   ... float is same size as jint
                          jobjhash o;   ... object reference same size
  
                          jlong    l;   ... TWO jint words
                          jdouble  d;   ... TWO jint words
  
   (See also spec table 4.6)
  
                          i       = v._jint;

                          b       = v._jbyte;
                          z       = v._jboolean;
                          s       = v._jshort;
                          c       = v._jchar;

                          f       = v._jfloat;
                          o       = v._jobjhash;

                          l       = v._jlong;
                          d       = v._jlong;
  
   and vice versa:
  
                          v._jint     = i;

                          v._jbyte    = b;
                          v._jbyte    = b;
                          v._jboolean = z;
                          v._jshort   = s;
                          v._jchar    = c;

                          v._jfloat   = f;
                          v._jobjhash = o;

                          v._jlong    = l;
                          v._jdouble  = d;
   

Although most of the items in this union are Java primatives, there are also contained herein are two members that are not primatives, namely the object reference hash and the array reference hash. By implementing them here, both primative and reference, all possible Java data types are represented in one data structure, which is very handy for concise object representations without any redundant data structures in different places.

Notice that for CONFIG_WORDWIDTH32 implementations, the (jlong) will be the longest data type, as an 8-byte integer. Notice also that for CONFIG_WORDWIDTH64 implementations, this will not change because there are no types such as pointers that will change sizes here. Since this typedef will be used extensively in the runtime environment, this inherent constraint can help plan maximum heap sizing.

Definition at line 131 of file jvalue.h.

Data Fields

jvm_object_hash _jarray
 Object hash of next lower array dim.
jboolean _jboolean
 Sub-integer primative jboolean.
jbyte _jbyte
 Sub-integer primative jbyte.
jchar _jchar
 Sub-integer primative jchar.
jdouble _jdouble
 Primative jdouble, per tables 4.2/4.6.
jfloat _jfloat
 Primative jfloat, per tables 4.2/4.6.
jint _jint
 Primative jint, per tables 4.2/4.6.
jlong _jlong
 Primative jlong, per tables 4.2/4.6.
jvm_object_hash _jobjhash
 Object hash of an arbitrary object.
jshort _jshort
 Sub-integer primative jshort.
jvm_object_hash _jstring
 Object hash for the quasi-primative java.lang.String .


Field Documentation

jbyte jvalue::_jbyte
 

Sub-integer primative jbyte.

Definition at line 133 of file jvalue.h.

jboolean jvalue::_jboolean
 

Sub-integer primative jboolean.

Definition at line 135 of file jvalue.h.

jshort jvalue::_jshort
 

Sub-integer primative jshort.

Definition at line 137 of file jvalue.h.

jchar jvalue::_jchar
 

Sub-integer primative jchar.

Definition at line 139 of file jvalue.h.

jint jvalue::_jint
 

Primative jint, per tables 4.2/4.6.

Definition at line 142 of file jvalue.h.

jlong jvalue::_jlong
 

Primative jlong, per tables 4.2/4.6.

Definition at line 144 of file jvalue.h.

jfloat jvalue::_jfloat
 

Primative jfloat, per tables 4.2/4.6.

Definition at line 146 of file jvalue.h.

jdouble jvalue::_jdouble
 

Primative jdouble, per tables 4.2/4.6.

Definition at line 148 of file jvalue.h.

jvm_object_hash jvalue::_jstring
 

Object hash for the quasi-primative java.lang.String .

Except for this one item, table 4.6 is a subsest of table 4.2.

Definition at line 152 of file jvalue.h.

jvm_object_hash jvalue::_jarray
 

Object hash of next lower array dim.

Definition at line 160 of file jvalue.h.

jvm_object_hash jvalue::_jobjhash
 

Object hash of an arbitrary object.

Definition at line 161 of file jvalue.h.


The documentation for this union was generated from the following file:
Generated on Fri Sep 30 18:50:55 2005 by  doxygen 1.4.4