61 Klass* _klass; |
61 Klass* _klass; |
62 narrowKlass _compressed_klass; |
62 narrowKlass _compressed_klass; |
63 } _metadata; |
63 } _metadata; |
64 |
64 |
65 public: |
65 public: |
66 markOop mark() const { return _mark; } |
66 inline markOop mark() const; |
67 markOop* mark_addr() const { return (markOop*) &_mark; } |
67 inline markOop mark_raw() const; |
68 |
68 inline markOop* mark_addr_raw() const; |
69 void set_mark(volatile markOop m) { _mark = m; } |
69 |
|
70 inline void set_mark(volatile markOop m); |
|
71 inline void set_mark_raw(volatile markOop m); |
70 |
72 |
71 inline void release_set_mark(markOop m); |
73 inline void release_set_mark(markOop m); |
72 inline markOop cas_set_mark(markOop new_mark, markOop old_mark); |
74 inline markOop cas_set_mark(markOop new_mark, markOop old_mark); |
|
75 inline markOop cas_set_mark_raw(markOop new_mark, markOop old_mark); |
73 |
76 |
74 // Used only to re-initialize the mark word (e.g., of promoted |
77 // Used only to re-initialize the mark word (e.g., of promoted |
75 // objects during a GC) -- requires a valid klass pointer |
78 // objects during a GC) -- requires a valid klass pointer |
76 inline void init_mark(); |
79 inline void init_mark(); |
|
80 inline void init_mark_raw(); |
77 |
81 |
78 inline Klass* klass() const; |
82 inline Klass* klass() const; |
79 inline Klass* klass_or_null() const volatile; |
83 inline Klass* klass_or_null() const volatile; |
80 inline Klass* klass_or_null_acquire() const volatile; |
84 inline Klass* klass_or_null_acquire() const volatile; |
81 inline Klass** klass_addr(); |
85 inline Klass** klass_addr(); |
235 |
239 |
236 // locking operations |
240 // locking operations |
237 inline bool is_locked() const; |
241 inline bool is_locked() const; |
238 inline bool is_unlocked() const; |
242 inline bool is_unlocked() const; |
239 inline bool has_bias_pattern() const; |
243 inline bool has_bias_pattern() const; |
|
244 inline bool has_bias_pattern_raw() const; |
240 |
245 |
241 // asserts and guarantees |
246 // asserts and guarantees |
242 static bool is_oop(oop obj, bool ignore_mark_word = false); |
247 static bool is_oop(oop obj, bool ignore_mark_word = false); |
243 static bool is_oop_or_null(oop obj, bool ignore_mark_word = false); |
248 static bool is_oop_or_null(oop obj, bool ignore_mark_word = false); |
244 #ifndef PRODUCT |
249 #ifndef PRODUCT |
321 |
326 |
322 // Alternate hashing code if string table is rehashed |
327 // Alternate hashing code if string table is rehashed |
323 unsigned int new_hash(juint seed); |
328 unsigned int new_hash(juint seed); |
324 |
329 |
325 // marks are forwarded to stack when object is locked |
330 // marks are forwarded to stack when object is locked |
326 inline bool has_displaced_mark() const; |
331 inline bool has_displaced_mark_raw() const; |
327 inline markOop displaced_mark() const; |
332 inline markOop displaced_mark_raw() const; |
328 inline void set_displaced_mark(markOop m); |
333 inline void set_displaced_mark_raw(markOop m); |
329 |
334 |
330 static bool has_klass_gap(); |
335 static bool has_klass_gap(); |
331 |
336 |
332 // for code generation |
337 // for code generation |
333 static int mark_offset_in_bytes() { return offset_of(oopDesc, _mark); } |
338 static int mark_offset_in_bytes() { return offset_of(oopDesc, _mark); } |