4516 4517 #define AOS_FIELDS_DO(macro) \ 4518 macro(_owner_offset, k, "exclusiveOwnerThread", thread_signature, false) 4519 4520 void java_util_concurrent_locks_AbstractOwnableSynchronizer::compute_offsets() { 4521 InstanceKlass* k = SystemDictionary::java_util_concurrent_locks_AbstractOwnableSynchronizer_klass(); 4522 AOS_FIELDS_DO(FIELD_COMPUTE_OFFSET); 4523 } 4524 4525 oop java_util_concurrent_locks_AbstractOwnableSynchronizer::get_owner_threadObj(oop obj) { 4526 assert(_owner_offset != 0, "Must be initialized"); 4527 return obj->obj_field(_owner_offset); 4528 } 4529 4530 #if INCLUDE_CDS 4531 void java_util_concurrent_locks_AbstractOwnableSynchronizer::serialize_offsets(SerializeClosure* f) { 4532 AOS_FIELDS_DO(FIELD_SERIALIZE_OFFSET); 4533 } 4534 #endif 4535 4536 int java_lang_Integer_IntegerCache::_static_cache_offset; 4537 int java_lang_Long_LongCache::_static_cache_offset; 4538 int java_lang_Character_CharacterCache::_static_cache_offset; 4539 int java_lang_Short_ShortCache::_static_cache_offset; 4540 int java_lang_Byte_ByteCache::_static_cache_offset; 4541 4542 #define INTEGER_CACHE_FIELDS_DO(macro) \ 4543 macro(_static_cache_offset, k, "cache", java_lang_Integer_array_signature, true) 4544 4545 void java_lang_Integer_IntegerCache::compute_offsets(InstanceKlass *k) { 4546 guarantee(k != NULL && k->is_initialized(), "must be loaded and initialized"); 4547 INTEGER_CACHE_FIELDS_DO(FIELD_COMPUTE_OFFSET); 4548 } 4549 4550 objArrayOop java_lang_Integer_IntegerCache::cache(InstanceKlass *ik) { 4551 oop base = ik->static_field_base_raw(); 4552 return objArrayOop(base->obj_field(_static_cache_offset)); 4553 } 4554 4555 Symbol* java_lang_Integer_IntegerCache::symbol() { | 4516 4517 #define AOS_FIELDS_DO(macro) \ 4518 macro(_owner_offset, k, "exclusiveOwnerThread", thread_signature, false) 4519 4520 void java_util_concurrent_locks_AbstractOwnableSynchronizer::compute_offsets() { 4521 InstanceKlass* k = SystemDictionary::java_util_concurrent_locks_AbstractOwnableSynchronizer_klass(); 4522 AOS_FIELDS_DO(FIELD_COMPUTE_OFFSET); 4523 } 4524 4525 oop java_util_concurrent_locks_AbstractOwnableSynchronizer::get_owner_threadObj(oop obj) { 4526 assert(_owner_offset != 0, "Must be initialized"); 4527 return obj->obj_field(_owner_offset); 4528 } 4529 4530 #if INCLUDE_CDS 4531 void java_util_concurrent_locks_AbstractOwnableSynchronizer::serialize_offsets(SerializeClosure* f) { 4532 AOS_FIELDS_DO(FIELD_SERIALIZE_OFFSET); 4533 } 4534 #endif 4535 4536 int vector_VectorPayload::_payload_offset; 4537 4538 #define VECTORPAYLOAD_FIELDS_DO(macro) \ 4539 macro(_payload_offset, k, "payload", object_signature, false) 4540 4541 void vector_VectorPayload::compute_offsets() { 4542 InstanceKlass* k = SystemDictionary::vector_VectorPayload_klass(); 4543 VECTORPAYLOAD_FIELDS_DO(FIELD_COMPUTE_OFFSET); 4544 } 4545 4546 #if INCLUDE_CDS 4547 void vector_VectorPayload::serialize_offsets(SerializeClosure* f) { 4548 VECTORPAYLOAD_FIELDS_DO(FIELD_SERIALIZE_OFFSET); 4549 } 4550 #endif 4551 4552 void vector_VectorPayload::set_payload(oop o, oop val) { 4553 o->obj_field_put(_payload_offset, val); 4554 } 4555 4556 bool vector_VectorPayload::is_instance(oop obj) { 4557 return obj != NULL && is_subclass(obj->klass()); 4558 } 4559 4560 int java_lang_Integer_IntegerCache::_static_cache_offset; 4561 int java_lang_Long_LongCache::_static_cache_offset; 4562 int java_lang_Character_CharacterCache::_static_cache_offset; 4563 int java_lang_Short_ShortCache::_static_cache_offset; 4564 int java_lang_Byte_ByteCache::_static_cache_offset; 4565 4566 #define INTEGER_CACHE_FIELDS_DO(macro) \ 4567 macro(_static_cache_offset, k, "cache", java_lang_Integer_array_signature, true) 4568 4569 void java_lang_Integer_IntegerCache::compute_offsets(InstanceKlass *k) { 4570 guarantee(k != NULL && k->is_initialized(), "must be loaded and initialized"); 4571 INTEGER_CACHE_FIELDS_DO(FIELD_COMPUTE_OFFSET); 4572 } 4573 4574 objArrayOop java_lang_Integer_IntegerCache::cache(InstanceKlass *ik) { 4575 oop base = ik->static_field_base_raw(); 4576 return objArrayOop(base->obj_field(_static_cache_offset)); 4577 } 4578 4579 Symbol* java_lang_Integer_IntegerCache::symbol() { |