297 template <typename OopClosureType>
298 inline int oop_iterate_size(OopClosureType* cl, MemRegion mr);
299
300 template <typename OopClosureType>
301 inline void oop_iterate_backwards(OopClosureType* cl);
302
303 inline static bool is_instanceof_or_null(oop obj, Klass* klass);
304
305 // identity hash; returns the identity hash key (computes it if necessary)
306 // NOTE with the introduction of UseBiasedLocking that identity_hash() might reach a
307 // safepoint if called on a biased object. Calling code must be aware of that.
308 inline intptr_t identity_hash();
309 intptr_t slow_identity_hash();
310
311 // marks are forwarded to stack when object is locked
312 inline bool has_displaced_mark_raw() const;
313 inline markWord displaced_mark_raw() const;
314 inline void set_displaced_mark_raw(markWord m);
315
316 // Checks if the mark word needs to be preserved
317 inline bool mark_must_be_preserved(markWord m) const;
318 inline bool mark_must_be_preserved_for_promotion_failure(markWord m) const;
319
320 static bool has_klass_gap();
321
322 // for code generation
323 static int mark_offset_in_bytes() { return offset_of(oopDesc, _mark); }
324 static int klass_offset_in_bytes() { return offset_of(oopDesc, _metadata._klass); }
325 static int klass_gap_offset_in_bytes() {
326 assert(has_klass_gap(), "only applicable to compressed klass pointers");
327 return klass_offset_in_bytes() + sizeof(narrowKlass);
328 }
329
330 // for error reporting
331 static void* load_klass_raw(oop obj);
332 static void* load_oop_raw(oop obj, int offset);
333 static bool is_valid(oop obj);
334 static oop oop_or_null(address addr);
335 };
336
|
297 template <typename OopClosureType>
298 inline int oop_iterate_size(OopClosureType* cl, MemRegion mr);
299
300 template <typename OopClosureType>
301 inline void oop_iterate_backwards(OopClosureType* cl);
302
303 inline static bool is_instanceof_or_null(oop obj, Klass* klass);
304
305 // identity hash; returns the identity hash key (computes it if necessary)
306 // NOTE with the introduction of UseBiasedLocking that identity_hash() might reach a
307 // safepoint if called on a biased object. Calling code must be aware of that.
308 inline intptr_t identity_hash();
309 intptr_t slow_identity_hash();
310
311 // marks are forwarded to stack when object is locked
312 inline bool has_displaced_mark_raw() const;
313 inline markWord displaced_mark_raw() const;
314 inline void set_displaced_mark_raw(markWord m);
315
316 // Checks if the mark word needs to be preserved
317 inline bool mark_must_be_preserved() const;
318 inline bool mark_must_be_preserved(markWord m) const;
319 inline bool mark_must_be_preserved_for_promotion_failure(markWord m) const;
320
321 static bool has_klass_gap();
322
323 // for code generation
324 static int mark_offset_in_bytes() { return offset_of(oopDesc, _mark); }
325 static int klass_offset_in_bytes() { return offset_of(oopDesc, _metadata._klass); }
326 static int klass_gap_offset_in_bytes() {
327 assert(has_klass_gap(), "only applicable to compressed klass pointers");
328 return klass_offset_in_bytes() + sizeof(narrowKlass);
329 }
330
331 // for error reporting
332 static void* load_klass_raw(oop obj);
333 static void* load_oop_raw(oop obj, int offset);
334 static bool is_valid(oop obj);
335 static oop oop_or_null(address addr);
336 };
337
|