mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8212605: Pure-Java implementation of AccessController.doPrivileged
Reviewed-by: dholmes, mullan, vlivanov, mchung, alanb, rriggs
This commit is contained in:
parent
c8c41d1444
commit
a9ae141836
24 changed files with 213 additions and 450 deletions
|
@ -1066,7 +1066,7 @@ public:
|
|||
_method_DontInline,
|
||||
_method_InjectedProfile,
|
||||
_method_LambdaForm_Compiled,
|
||||
_method_LambdaForm_Hidden,
|
||||
_method_Hidden,
|
||||
_method_HotSpotIntrinsicCandidate,
|
||||
_jdk_internal_vm_annotation_Contended,
|
||||
_field_Stable,
|
||||
|
@ -2121,7 +2121,12 @@ AnnotationCollector::annotation_index(const ClassLoaderData* loader_data,
|
|||
case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Hidden_signature): {
|
||||
if (_location != _in_method) break; // only allow for methods
|
||||
if (!privileged) break; // only allow in privileged code
|
||||
return _method_LambdaForm_Hidden;
|
||||
return _method_Hidden;
|
||||
}
|
||||
case vmSymbols::VM_SYMBOL_ENUM_NAME(java_security_AccessController_Hidden_signature): {
|
||||
if (_location != _in_method) break; // only allow for methods
|
||||
if (!privileged) break; // only allow in privileged code
|
||||
return _method_Hidden;
|
||||
}
|
||||
case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_HotSpotIntrinsicCandidate_signature): {
|
||||
if (_location != _in_method) break; // only allow for methods
|
||||
|
@ -2178,7 +2183,7 @@ void MethodAnnotationCollector::apply_to(const methodHandle& m) {
|
|||
m->set_has_injected_profile(true);
|
||||
if (has_annotation(_method_LambdaForm_Compiled) && m->intrinsic_id() == vmIntrinsics::_none)
|
||||
m->set_intrinsic_id(vmIntrinsics::_compiledLambdaForm);
|
||||
if (has_annotation(_method_LambdaForm_Hidden))
|
||||
if (has_annotation(_method_Hidden))
|
||||
m->set_hidden(true);
|
||||
if (has_annotation(_method_HotSpotIntrinsicCandidate) && !m->is_synthetic())
|
||||
m->set_intrinsic_candidate(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue