< prev index next >

src/hotspot/share/oops/oop.hpp

Print this page
rev 48545 : Value-based classes (vbc) / Oop value test via metadata ptr


  63 
  64  public:
  65   markOop  mark()      const { return _mark; }
  66   markOop* mark_addr() const { return (markOop*) &_mark; }
  67 
  68   void set_mark(volatile markOop m) { _mark = m; }
  69 
  70   inline void release_set_mark(markOop m);
  71   inline markOop cas_set_mark(markOop new_mark, markOop old_mark);
  72 
  73   // Used only to re-initialize the mark word (e.g., of promoted
  74   // objects during a GC) -- requires a valid klass pointer
  75   inline void init_mark();
  76 
  77   inline Klass* klass() const;
  78   inline Klass* klass_or_null() const volatile;
  79   inline Klass* klass_or_null_acquire() const volatile;
  80   inline Klass** klass_addr();
  81   inline narrowKlass* compressed_klass_addr();
  82 




  83   inline void set_klass(Klass* k);
  84   inline void release_set_klass(Klass* k);
  85 
  86   // For klass field compression
  87   inline int klass_gap() const;
  88   inline void set_klass_gap(int z);
  89   // For when the klass pointer is being used as a linked list "next" field.
  90   inline void set_klass_to_list_ptr(oop k);
  91   inline oop list_ptr_from_klass();
  92 
  93   // size of object header, aligned to platform wordSize
  94   static int header_size() { return sizeof(oopDesc)/HeapWordSize; }
  95 
  96   // Returns whether this is an instance of k or an instance of a subclass of k
  97   inline bool is_a(Klass* k) const;
  98 
  99   // Returns the actual oop size of the object
 100   inline int size();
 101 
 102   // Sometimes (for complicated concurrency-related reasons), it is useful




  63 
  64  public:
  65   markOop  mark()      const { return _mark; }
  66   markOop* mark_addr() const { return (markOop*) &_mark; }
  67 
  68   void set_mark(volatile markOop m) { _mark = m; }
  69 
  70   inline void release_set_mark(markOop m);
  71   inline markOop cas_set_mark(markOop new_mark, markOop old_mark);
  72 
  73   // Used only to re-initialize the mark word (e.g., of promoted
  74   // objects during a GC) -- requires a valid klass pointer
  75   inline void init_mark();
  76 
  77   inline Klass* klass() const;
  78   inline Klass* klass_or_null() const volatile;
  79   inline Klass* klass_or_null_acquire() const volatile;
  80   inline Klass** klass_addr();
  81   inline narrowKlass* compressed_klass_addr();
  82 
  83 #if INCLUDE_VBC // fast oop only test (does not load klass)
  84   inline bool klass_is_value_based();
  85 #endif
  86 
  87   inline void set_klass(Klass* k);
  88   inline void release_set_klass(Klass* k);
  89 
  90   // For klass field compression
  91   inline int klass_gap() const;
  92   inline void set_klass_gap(int z);
  93   // For when the klass pointer is being used as a linked list "next" field.
  94   inline void set_klass_to_list_ptr(oop k);
  95   inline oop list_ptr_from_klass();
  96 
  97   // size of object header, aligned to platform wordSize
  98   static int header_size() { return sizeof(oopDesc)/HeapWordSize; }
  99 
 100   // Returns whether this is an instance of k or an instance of a subclass of k
 101   inline bool is_a(Klass* k) const;
 102 
 103   // Returns the actual oop size of the object
 104   inline int size();
 105 
 106   // Sometimes (for complicated concurrency-related reasons), it is useful


< prev index next >