< prev index next >

src/share/vm/classfile/javaClasses.hpp

Print this page




 832     return ( type == T_LONG || type == T_DOUBLE ) ? long_value_offset :
 833                                                     value_offset;
 834   }
 835 
 836   // Debugging
 837   friend class JavaClasses;
 838 };
 839 
 840 
 841 
 842 // Interface to java.lang.ref.Reference objects
 843 
 844 class java_lang_ref_Reference: AllStatic {
 845  public:
 846   enum {
 847    hc_referent_offset   = 0,
 848    hc_queue_offset      = 1,
 849    hc_next_offset       = 2,
 850    hc_discovered_offset = 3  // Is not last, see SoftRefs.
 851   };
 852   enum {
 853    hc_static_lock_offset    = 0,
 854    hc_static_pending_offset = 1
 855   };
 856 
 857   static int referent_offset;
 858   static int queue_offset;
 859   static int next_offset;
 860   static int discovered_offset;
 861   static int static_lock_offset;
 862   static int static_pending_offset;
 863   static int number_of_fake_oop_fields;
 864 
 865   // Accessors
 866   static inline oop referent(oop ref);
 867   static inline void set_referent(oop ref, oop value);
 868   static inline void set_referent_raw(oop ref, oop value);
 869   static inline HeapWord* referent_addr(oop ref);
 870   static inline oop next(oop ref);
 871   static inline void set_next(oop ref, oop value);
 872   static inline void set_next_raw(oop ref, oop value);
 873   static inline HeapWord* next_addr(oop ref);
 874   static inline oop discovered(oop ref);
 875   static inline void set_discovered(oop ref, oop value);
 876   static inline void set_discovered_raw(oop ref, oop value);
 877   static inline HeapWord* discovered_addr(oop ref);
 878 
 879   // Accessors for statics
 880   static oop  pending_list_lock();
 881   static oop  pending_list();
 882 
 883   static HeapWord*  pending_list_lock_addr();
 884   static HeapWord*  pending_list_addr();
 885 };
 886 
 887 
 888 // Interface to java.lang.ref.SoftReference objects
 889 
 890 class java_lang_ref_SoftReference: public java_lang_ref_Reference {
 891  public:
 892   enum {
 893    // The timestamp is a long field and may need to be adjusted for alignment.
 894    hc_timestamp_offset  = hc_discovered_offset + 1
 895   };
 896   enum {
 897    hc_static_clock_offset = 0
 898   };
 899 
 900   static int timestamp_offset;
 901   static int static_clock_offset;
 902 
 903   // Accessors
 904   static jlong timestamp(oop ref);




 832     return ( type == T_LONG || type == T_DOUBLE ) ? long_value_offset :
 833                                                     value_offset;
 834   }
 835 
 836   // Debugging
 837   friend class JavaClasses;
 838 };
 839 
 840 
 841 
 842 // Interface to java.lang.ref.Reference objects
 843 
 844 class java_lang_ref_Reference: AllStatic {
 845  public:
 846   enum {
 847    hc_referent_offset   = 0,
 848    hc_queue_offset      = 1,
 849    hc_next_offset       = 2,
 850    hc_discovered_offset = 3  // Is not last, see SoftRefs.
 851   };




 852 
 853   static int referent_offset;
 854   static int queue_offset;
 855   static int next_offset;
 856   static int discovered_offset;


 857   static int number_of_fake_oop_fields;
 858 
 859   // Accessors
 860   static inline oop referent(oop ref);
 861   static inline void set_referent(oop ref, oop value);
 862   static inline void set_referent_raw(oop ref, oop value);
 863   static inline HeapWord* referent_addr(oop ref);
 864   static inline oop next(oop ref);
 865   static inline void set_next(oop ref, oop value);
 866   static inline void set_next_raw(oop ref, oop value);
 867   static inline HeapWord* next_addr(oop ref);
 868   static inline oop discovered(oop ref);
 869   static inline void set_discovered(oop ref, oop value);
 870   static inline void set_discovered_raw(oop ref, oop value);
 871   static inline HeapWord* discovered_addr(oop ref);







 872 };
 873 
 874 
 875 // Interface to java.lang.ref.SoftReference objects
 876 
 877 class java_lang_ref_SoftReference: public java_lang_ref_Reference {
 878  public:
 879   enum {
 880    // The timestamp is a long field and may need to be adjusted for alignment.
 881    hc_timestamp_offset  = hc_discovered_offset + 1
 882   };
 883   enum {
 884    hc_static_clock_offset = 0
 885   };
 886 
 887   static int timestamp_offset;
 888   static int static_clock_offset;
 889 
 890   // Accessors
 891   static jlong timestamp(oop ref);


< prev index next >