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 inline void release_set_mark(markOop m);
78 inline 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 inline void init_mark();
83
84 inline Klass* klass() const;
85 inline Klass* klass_or_null() const volatile;
86 inline Klass** klass_addr();
87 inline narrowKlass* compressed_klass_addr();
88
89 inline void set_klass(Klass* k);
90 inline void release_set_klass(Klass* k);
91
92 // For klass field compression
93 inline int klass_gap() const;
94 inline void set_klass_gap(int z);
95 // For when the klass pointer is being used as a linked list "next" field.
96 inline void set_klass_to_list_ptr(oop k);
97 inline oop list_ptr_from_klass();
98
99 // size of object header, aligned to platform wordSize
100 static int header_size() { return sizeof(oopDesc)/HeapWordSize; }
101
102 // Returns whether this is an instance of k or an instance of a subclass of k
103 inline bool is_a(Klass* k) const;
104
105 // Returns the actual oop size of the object
|
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 inline void release_set_mark(markOop m);
78 inline 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 inline void init_mark();
83
84 inline Klass* klass() const;
85 inline Klass* klass_or_null() const volatile;
86 inline Klass* klass_or_null_acquire() const volatile;
87 inline Klass** klass_addr();
88 inline narrowKlass* compressed_klass_addr();
89
90 inline void set_klass(Klass* k);
91 inline void release_set_klass(Klass* k);
92
93 // For klass field compression
94 inline int klass_gap() const;
95 inline void set_klass_gap(int z);
96 // For when the klass pointer is being used as a linked list "next" field.
97 inline void set_klass_to_list_ptr(oop k);
98 inline oop list_ptr_from_klass();
99
100 // size of object header, aligned to platform wordSize
101 static int header_size() { return sizeof(oopDesc)/HeapWordSize; }
102
103 // Returns whether this is an instance of k or an instance of a subclass of k
104 inline bool is_a(Klass* k) const;
105
106 // Returns the actual oop size of the object
|