372 inline intptr_t identity_hash(); 373 intptr_t slow_identity_hash(); 374 375 // Alternate hashing code if string table is rehashed 376 unsigned int new_hash(juint seed); 377 378 // marks are forwarded to stack when object is locked 379 inline bool has_displaced_mark() const; 380 inline markOop displaced_mark() const; 381 inline void set_displaced_mark(markOop m); 382 383 static bool has_klass_gap(); 384 385 // for code generation 386 static int mark_offset_in_bytes() { return offset_of(oopDesc, _mark); } 387 static int klass_offset_in_bytes() { return offset_of(oopDesc, _metadata._klass); } 388 static int klass_gap_offset_in_bytes() { 389 assert(has_klass_gap(), "only applicable to compressed klass pointers"); 390 return klass_offset_in_bytes() + sizeof(narrowKlass); 391 } 392 }; 393 394 #endif // SHARE_VM_OOPS_OOP_HPP | 372 inline intptr_t identity_hash(); 373 intptr_t slow_identity_hash(); 374 375 // Alternate hashing code if string table is rehashed 376 unsigned int new_hash(juint seed); 377 378 // marks are forwarded to stack when object is locked 379 inline bool has_displaced_mark() const; 380 inline markOop displaced_mark() const; 381 inline void set_displaced_mark(markOop m); 382 383 static bool has_klass_gap(); 384 385 // for code generation 386 static int mark_offset_in_bytes() { return offset_of(oopDesc, _mark); } 387 static int klass_offset_in_bytes() { return offset_of(oopDesc, _metadata._klass); } 388 static int klass_gap_offset_in_bytes() { 389 assert(has_klass_gap(), "only applicable to compressed klass pointers"); 390 return klass_offset_in_bytes() + sizeof(narrowKlass); 391 } 392 393 static bool is_archive_object(oop p) NOT_CDS_JAVA_HEAP_RETURN_(false); 394 }; 395 396 #endif // SHARE_VM_OOPS_OOP_HPP |