src/share/vm/oops/instanceKlass.hpp

changeset 3526
a79cb7c55012
parent 3401
8f8b94305aff
child 3528
b7b8b6d2f97d
     1.1 --- a/src/share/vm/oops/instanceKlass.hpp	Fri Jan 20 17:07:33 2012 -0800
     1.2 +++ b/src/share/vm/oops/instanceKlass.hpp	Wed Jan 25 17:40:51 2012 -0500
     1.3 @@ -240,7 +240,6 @@
     1.4    Thread*         _init_thread;          // Pointer to current thread doing initialization (to handle recusive initialization)
     1.5    int             _vtable_len;           // length of Java vtable (in words)
     1.6    int             _itable_len;           // length of Java itable (in words)
     1.7 -  ReferenceType   _reference_type;       // reference type
     1.8    OopMapCache*    volatile _oop_map_cache;   // OopMapCache for all methods in the klass (allocated lazily)
     1.9    JNIid*          _jni_ids;              // First JNI identifier for static fields in this class
    1.10    jmethodID*      _methods_jmethod_ids;  // jmethodIDs corresponding to method_idnum, or NULL if none
    1.11 @@ -265,6 +264,8 @@
    1.12    // _idnum_allocated_count.
    1.13    u1              _init_state;                    // state of class
    1.14  
    1.15 +  u1              _reference_type;                // reference type
    1.16 +
    1.17    // embedded Java vtable follows here
    1.18    // embedded Java itables follows here
    1.19    // embedded static fields follows here
    1.20 @@ -407,8 +408,11 @@
    1.21    void eager_initialize(Thread *thread);
    1.22  
    1.23    // reference type
    1.24 -  ReferenceType reference_type() const     { return _reference_type; }
    1.25 -  void set_reference_type(ReferenceType t) { _reference_type = t; }
    1.26 +  ReferenceType reference_type() const     { return (ReferenceType)_reference_type; }
    1.27 +  void set_reference_type(ReferenceType t) {
    1.28 +    assert(t == (u1)t, "overflow");
    1.29 +    _reference_type = (u1)t;
    1.30 +  }
    1.31  
    1.32    static ByteSize reference_type_offset() { return in_ByteSize(sizeof(klassOopDesc) + offset_of(instanceKlass, _reference_type)); }
    1.33  

mercurial