src/share/vm/classfile/classFileParser.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/classfile

src/share/vm/classfile/classFileParser.cpp

Print this page




1738   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_DontInline_signature):
1739     if (_location != _in_method)  break;  // only allow for methods
1740     if (!privileged)              break;  // only allow in privileged code
1741     return _method_DontInline;
1742   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_InjectedProfile_signature):
1743     if (_location != _in_method)  break;  // only allow for methods
1744     if (!privileged)              break;  // only allow in privileged code
1745     return _method_InjectedProfile;
1746   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Compiled_signature):
1747     if (_location != _in_method)  break;  // only allow for methods
1748     if (!privileged)              break;  // only allow in privileged code
1749     return _method_LambdaForm_Compiled;
1750   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Hidden_signature):
1751     if (_location != _in_method)  break;  // only allow for methods
1752     if (!privileged)              break;  // only allow in privileged code
1753     return _method_LambdaForm_Hidden;
1754   case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_HotSpotIntrinsicCandidate_signature):
1755     if (_location != _in_method)  break;  // only allow for methods
1756     if (!privileged)              break;  // only allow in privileged code
1757     return _method_HotSpotIntrinsicCandidate;






1758   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_Stable_signature):
1759     if (_location != _in_field)   break;  // only allow for fields
1760     if (!privileged)              break;  // only allow in privileged code
1761     return _field_Stable;
1762   case vmSymbols::VM_SYMBOL_ENUM_NAME(sun_misc_Contended_signature):
1763     if (_location != _in_field && _location != _in_class)          break;  // only allow for fields and classes
1764     if (!EnableContended || (RestrictContended && !privileged))    break;  // honor privileges
1765     return _sun_misc_Contended;
1766   default: break;
1767   }
1768   return AnnotationCollector::_unknown;
1769 }
1770 
1771 void ClassFileParser::FieldAnnotationCollector::apply_to(FieldInfo* f) {
1772   if (is_contended())
1773     f->set_contended_group(contended_group());
1774   if (is_stable())
1775     f->set_stable(true);
1776 }
1777 




1738   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_DontInline_signature):
1739     if (_location != _in_method)  break;  // only allow for methods
1740     if (!privileged)              break;  // only allow in privileged code
1741     return _method_DontInline;
1742   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_InjectedProfile_signature):
1743     if (_location != _in_method)  break;  // only allow for methods
1744     if (!privileged)              break;  // only allow in privileged code
1745     return _method_InjectedProfile;
1746   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Compiled_signature):
1747     if (_location != _in_method)  break;  // only allow for methods
1748     if (!privileged)              break;  // only allow in privileged code
1749     return _method_LambdaForm_Compiled;
1750   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Hidden_signature):
1751     if (_location != _in_method)  break;  // only allow for methods
1752     if (!privileged)              break;  // only allow in privileged code
1753     return _method_LambdaForm_Hidden;
1754   case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_HotSpotIntrinsicCandidate_signature):
1755     if (_location != _in_method)  break;  // only allow for methods
1756     if (!privileged)              break;  // only allow in privileged code
1757     return _method_HotSpotIntrinsicCandidate;
1758 #if INCLUDE_JVMCI
1759   case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_jvmci_hotspot_Stable_signature):
1760     if (_location != _in_field)   break;  // only allow for fields
1761     if (!privileged)              break;  // only allow in privileged code
1762     return _field_Stable;
1763 #endif
1764   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_Stable_signature):
1765     if (_location != _in_field)   break;  // only allow for fields
1766     if (!privileged)              break;  // only allow in privileged code
1767     return _field_Stable;
1768   case vmSymbols::VM_SYMBOL_ENUM_NAME(sun_misc_Contended_signature):
1769     if (_location != _in_field && _location != _in_class)          break;  // only allow for fields and classes
1770     if (!EnableContended || (RestrictContended && !privileged))    break;  // honor privileges
1771     return _sun_misc_Contended;
1772   default: break;
1773   }
1774   return AnnotationCollector::_unknown;
1775 }
1776 
1777 void ClassFileParser::FieldAnnotationCollector::apply_to(FieldInfo* f) {
1778   if (is_contended())
1779     f->set_contended_group(contended_group());
1780   if (is_stable())
1781     f->set_stable(true);
1782 }
1783 


src/share/vm/classfile/classFileParser.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File