3724 InstanceKlass* k = SystemDictionary::CallSite_klass();
3725 CALLSITE_FIELDS_DO(FIELD_COMPUTE_OFFSET);
3726 }
3727
3728 #if INCLUDE_CDS
3729 void java_lang_invoke_CallSite::serialize_offsets(SerializeClosure* f) {
3730 CALLSITE_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
3731 }
3732 #endif
3733
3734 oop java_lang_invoke_CallSite::context_no_keepalive(oop call_site) {
3735 assert(java_lang_invoke_CallSite::is_instance(call_site), "");
3736
3737 oop dep_oop = call_site->obj_field_access<AS_NO_KEEPALIVE>(_context_offset);
3738 return dep_oop;
3739 }
3740
3741 // Support for java_lang_invoke_MethodHandleNatives_CallSiteContext
3742
3743 int java_lang_invoke_MethodHandleNatives_CallSiteContext::_vmdependencies_offset;
3744
3745 void java_lang_invoke_MethodHandleNatives_CallSiteContext::compute_offsets() {
3746 InstanceKlass* k = SystemDictionary::Context_klass();
3747 CALLSITECONTEXT_INJECTED_FIELDS(INJECTED_FIELD_COMPUTE_OFFSET);
3748 }
3749
3750 #if INCLUDE_CDS
3751 void java_lang_invoke_MethodHandleNatives_CallSiteContext::serialize_offsets(SerializeClosure* f) {
3752 CALLSITECONTEXT_INJECTED_FIELDS(INJECTED_FIELD_SERIALIZE_OFFSET);
3753 }
3754 #endif
3755
3756 DependencyContext java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(oop call_site) {
3757 assert(java_lang_invoke_MethodHandleNatives_CallSiteContext::is_instance(call_site), "");
3758 intptr_t* vmdeps_addr = (intptr_t*)call_site->field_addr(_vmdependencies_offset);
3759 DependencyContext dep_ctx(vmdeps_addr);
3760 return dep_ctx;
3761 }
3762
3763 // Support for java_security_AccessControlContext
3764
3765 int java_security_AccessControlContext::_context_offset = 0;
3766 int java_security_AccessControlContext::_privilegedContext_offset = 0;
3767 int java_security_AccessControlContext::_isPrivileged_offset = 0;
3768 int java_security_AccessControlContext::_isAuthorized_offset = -1;
3769
3770 #define ACCESSCONTROLCONTEXT_FIELDS_DO(macro) \
3771 macro(_context_offset, k, "context", protectiondomain_signature, false); \
3772 macro(_privilegedContext_offset, k, "privilegedContext", accesscontrolcontext_signature, false); \
3773 macro(_isPrivileged_offset, k, "isPrivileged", bool_signature, false); \
3774 macro(_isAuthorized_offset, k, "isAuthorized", bool_signature, false)
3775
3776 void java_security_AccessControlContext::compute_offsets() {
3777 assert(_isPrivileged_offset == 0, "offsets should be initialized only once");
3778 InstanceKlass* k = SystemDictionary::AccessControlContext_klass();
|
3724 InstanceKlass* k = SystemDictionary::CallSite_klass();
3725 CALLSITE_FIELDS_DO(FIELD_COMPUTE_OFFSET);
3726 }
3727
3728 #if INCLUDE_CDS
3729 void java_lang_invoke_CallSite::serialize_offsets(SerializeClosure* f) {
3730 CALLSITE_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
3731 }
3732 #endif
3733
3734 oop java_lang_invoke_CallSite::context_no_keepalive(oop call_site) {
3735 assert(java_lang_invoke_CallSite::is_instance(call_site), "");
3736
3737 oop dep_oop = call_site->obj_field_access<AS_NO_KEEPALIVE>(_context_offset);
3738 return dep_oop;
3739 }
3740
3741 // Support for java_lang_invoke_MethodHandleNatives_CallSiteContext
3742
3743 int java_lang_invoke_MethodHandleNatives_CallSiteContext::_vmdependencies_offset;
3744 int java_lang_invoke_MethodHandleNatives_CallSiteContext::_last_cleanup_offset;
3745
3746 void java_lang_invoke_MethodHandleNatives_CallSiteContext::compute_offsets() {
3747 InstanceKlass* k = SystemDictionary::Context_klass();
3748 CALLSITECONTEXT_INJECTED_FIELDS(INJECTED_FIELD_COMPUTE_OFFSET);
3749 }
3750
3751 #if INCLUDE_CDS
3752 void java_lang_invoke_MethodHandleNatives_CallSiteContext::serialize_offsets(SerializeClosure* f) {
3753 CALLSITECONTEXT_INJECTED_FIELDS(INJECTED_FIELD_SERIALIZE_OFFSET);
3754 }
3755 #endif
3756
3757 DependencyContext java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(oop call_site) {
3758 assert(java_lang_invoke_MethodHandleNatives_CallSiteContext::is_instance(call_site), "");
3759 nmethodBucket* volatile* vmdeps_addr = (nmethodBucket* volatile*)call_site->field_addr(_vmdependencies_offset);
3760 volatile uint64_t* last_cleanup_addr = (volatile uint64_t*)call_site->field_addr(_last_cleanup_offset);
3761 DependencyContext dep_ctx(vmdeps_addr, last_cleanup_addr);
3762 return dep_ctx;
3763 }
3764
3765 // Support for java_security_AccessControlContext
3766
3767 int java_security_AccessControlContext::_context_offset = 0;
3768 int java_security_AccessControlContext::_privilegedContext_offset = 0;
3769 int java_security_AccessControlContext::_isPrivileged_offset = 0;
3770 int java_security_AccessControlContext::_isAuthorized_offset = -1;
3771
3772 #define ACCESSCONTROLCONTEXT_FIELDS_DO(macro) \
3773 macro(_context_offset, k, "context", protectiondomain_signature, false); \
3774 macro(_privilegedContext_offset, k, "privilegedContext", accesscontrolcontext_signature, false); \
3775 macro(_isPrivileged_offset, k, "isPrivileged", bool_signature, false); \
3776 macro(_isAuthorized_offset, k, "isAuthorized", bool_signature, false)
3777
3778 void java_security_AccessControlContext::compute_offsets() {
3779 assert(_isPrivileged_offset == 0, "offsets should be initialized only once");
3780 InstanceKlass* k = SystemDictionary::AccessControlContext_klass();
|