< prev index next >

src/share/vm/oops/oop.hpp

Print this page




  55 
  56 class PSPromotionManager;
  57 class ParCompactionManager;
  58 
  59 class oopDesc {
  60   friend class VMStructs;
  61  private:
  62   volatile markOop  _mark;
  63   union _metadata {
  64     Klass*      _klass;
  65     narrowKlass _compressed_klass;
  66   } _metadata;
  67 
  68   // Fast access to barrier set.  Must be initialized.
  69   static BarrierSet* _bs;
  70 
  71  public:
  72   markOop  mark() const         { return _mark; }
  73   markOop* mark_addr() const    { return (markOop*) &_mark; }
  74 
  75   void set_mark(volatile markOop m)      { _mark = m;   }
  76 
  77   void    release_set_mark(markOop m);
  78   markOop cas_set_mark(markOop new_mark, markOop old_mark);
  79 
  80   // Used only to re-initialize the mark word (e.g., of promoted
  81   // objects during a GC) -- requires a valid klass pointer
  82   void init_mark();
  83 
  84   Klass* klass() const;
  85   Klass* klass_or_null() const volatile;
  86   Klass** klass_addr();
  87   narrowKlass* compressed_klass_addr();
  88 
  89   void set_klass(Klass* k);
  90 
  91   // For klass field compression
  92   int klass_gap() const;
  93   void set_klass_gap(int z);
  94   // For when the klass pointer is being used as a linked list "next" field.
  95   void set_klass_to_list_ptr(oop k);


 194   oop obj_field(int offset) const;
 195   volatile oop obj_field_volatile(int offset) const;
 196   void obj_field_put(int offset, oop value);
 197   void obj_field_put_raw(int offset, oop value);
 198   void obj_field_put_volatile(int offset, oop value);
 199 
 200   Metadata* metadata_field(int offset) const;
 201   void metadata_field_put(int offset, Metadata* value);
 202 
 203   jbyte byte_field(int offset) const;
 204   void byte_field_put(int offset, jbyte contents);
 205 
 206   jchar char_field(int offset) const;
 207   void char_field_put(int offset, jchar contents);
 208 
 209   jboolean bool_field(int offset) const;
 210   void bool_field_put(int offset, jboolean contents);
 211 
 212   jint int_field(int offset) const;
 213   void int_field_put(int offset, jint contents);

 214 
 215   jshort short_field(int offset) const;
 216   void short_field_put(int offset, jshort contents);
 217 
 218   jlong long_field(int offset) const;
 219   void long_field_put(int offset, jlong contents);
 220 
 221   jfloat float_field(int offset) const;
 222   void float_field_put(int offset, jfloat contents);
 223 
 224   jdouble double_field(int offset) const;
 225   void double_field_put(int offset, jdouble contents);
 226 
 227   address address_field(int offset) const;
 228   void address_field_put(int offset, address contents);
 229 
 230   oop obj_field_acquire(int offset) const;
 231   void release_obj_field_put(int offset, oop value);
 232 
 233   jbyte byte_field_acquire(int offset) const;




  55 
  56 class PSPromotionManager;
  57 class ParCompactionManager;
  58 
  59 class oopDesc {
  60   friend class VMStructs;
  61  private:
  62   volatile markOop  _mark;
  63   union _metadata {
  64     Klass*      _klass;
  65     narrowKlass _compressed_klass;
  66   } _metadata;
  67 
  68   // Fast access to barrier set.  Must be initialized.
  69   static BarrierSet* _bs;
  70 
  71  public:
  72   markOop  mark() const         { return _mark; }
  73   markOop* mark_addr() const    { return (markOop*) &_mark; }
  74 
  75   void set_mark(volatile markOop m)      { _mark = m; }
  76 
  77   void    release_set_mark(markOop m);
  78   markOop cas_set_mark(markOop new_mark, markOop old_mark);
  79 
  80   // Used only to re-initialize the mark word (e.g., of promoted
  81   // objects during a GC) -- requires a valid klass pointer
  82   void init_mark();
  83 
  84   Klass* klass() const;
  85   Klass* klass_or_null() const volatile;
  86   Klass** klass_addr();
  87   narrowKlass* compressed_klass_addr();
  88 
  89   void set_klass(Klass* k);
  90 
  91   // For klass field compression
  92   int klass_gap() const;
  93   void set_klass_gap(int z);
  94   // For when the klass pointer is being used as a linked list "next" field.
  95   void set_klass_to_list_ptr(oop k);


 194   oop obj_field(int offset) const;
 195   volatile oop obj_field_volatile(int offset) const;
 196   void obj_field_put(int offset, oop value);
 197   void obj_field_put_raw(int offset, oop value);
 198   void obj_field_put_volatile(int offset, oop value);
 199 
 200   Metadata* metadata_field(int offset) const;
 201   void metadata_field_put(int offset, Metadata* value);
 202 
 203   jbyte byte_field(int offset) const;
 204   void byte_field_put(int offset, jbyte contents);
 205 
 206   jchar char_field(int offset) const;
 207   void char_field_put(int offset, jchar contents);
 208 
 209   jboolean bool_field(int offset) const;
 210   void bool_field_put(int offset, jboolean contents);
 211 
 212   jint int_field(int offset) const;
 213   void int_field_put(int offset, jint contents);
 214   void int_field_put_raw(int offset, jint contents);
 215 
 216   jshort short_field(int offset) const;
 217   void short_field_put(int offset, jshort contents);
 218 
 219   jlong long_field(int offset) const;
 220   void long_field_put(int offset, jlong contents);
 221 
 222   jfloat float_field(int offset) const;
 223   void float_field_put(int offset, jfloat contents);
 224 
 225   jdouble double_field(int offset) const;
 226   void double_field_put(int offset, jdouble contents);
 227 
 228   address address_field(int offset) const;
 229   void address_field_put(int offset, address contents);
 230 
 231   oop obj_field_acquire(int offset) const;
 232   void release_obj_field_put(int offset, oop value);
 233 
 234   jbyte byte_field_acquire(int offset) const;


< prev index next >