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