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

src/share/vm/classfile/classFileParser.cpp

Print this page
rev 5242 : [mq]: stable.rename


1757   case vmSymbols::VM_SYMBOL_ENUM_NAME(sun_reflect_CallerSensitive_signature):
1758     if (_location != _in_method)  break;  // only allow for methods
1759     if (!privileged)              break;  // only allow in privileged code
1760     return _method_CallerSensitive;
1761   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature):
1762     if (_location != _in_method)  break;  // only allow for methods
1763     if (!privileged)              break;  // only allow in privileged code
1764     return _method_ForceInline;
1765   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_DontInline_signature):
1766     if (_location != _in_method)  break;  // only allow for methods
1767     if (!privileged)              break;  // only allow in privileged code
1768     return _method_DontInline;
1769   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Compiled_signature):
1770     if (_location != _in_method)  break;  // only allow for methods
1771     if (!privileged)              break;  // only allow in privileged code
1772     return _method_LambdaForm_Compiled;
1773   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Hidden_signature):
1774     if (_location != _in_method)  break;  // only allow for methods
1775     if (!privileged)              break;  // only allow in privileged code
1776     return _method_LambdaForm_Hidden;
1777   case vmSymbols::VM_SYMBOL_ENUM_NAME(sun_invoke_Stable_signature):
1778     if (_location != _in_field)   break;  // only allow for fields
1779     if (!privileged)              break;  // only allow in privileged code
1780     return _field_Stable;
1781   case vmSymbols::VM_SYMBOL_ENUM_NAME(sun_misc_Contended_signature):
1782     if (_location != _in_field && _location != _in_class)          break;  // only allow for fields and classes
1783     if (!EnableContended || (RestrictContended && !privileged))    break;  // honor privileges
1784     return _sun_misc_Contended;
1785   default: break;
1786   }
1787   return AnnotationCollector::_unknown;
1788 }
1789 
1790 void ClassFileParser::FieldAnnotationCollector::apply_to(FieldInfo* f) {
1791   if (is_contended())
1792     f->set_contended_group(contended_group());
1793   if (is_stable())
1794     f->set_stable(true);
1795 }
1796 
1797 ClassFileParser::FieldAnnotationCollector::~FieldAnnotationCollector() {




1757   case vmSymbols::VM_SYMBOL_ENUM_NAME(sun_reflect_CallerSensitive_signature):
1758     if (_location != _in_method)  break;  // only allow for methods
1759     if (!privileged)              break;  // only allow in privileged code
1760     return _method_CallerSensitive;
1761   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature):
1762     if (_location != _in_method)  break;  // only allow for methods
1763     if (!privileged)              break;  // only allow in privileged code
1764     return _method_ForceInline;
1765   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_DontInline_signature):
1766     if (_location != _in_method)  break;  // only allow for methods
1767     if (!privileged)              break;  // only allow in privileged code
1768     return _method_DontInline;
1769   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Compiled_signature):
1770     if (_location != _in_method)  break;  // only allow for methods
1771     if (!privileged)              break;  // only allow in privileged code
1772     return _method_LambdaForm_Compiled;
1773   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Hidden_signature):
1774     if (_location != _in_method)  break;  // only allow for methods
1775     if (!privileged)              break;  // only allow in privileged code
1776     return _method_LambdaForm_Hidden;
1777   case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_Stable_signature):
1778     if (_location != _in_field)   break;  // only allow for fields
1779     if (!privileged)              break;  // only allow in privileged code
1780     return _field_Stable;
1781   case vmSymbols::VM_SYMBOL_ENUM_NAME(sun_misc_Contended_signature):
1782     if (_location != _in_field && _location != _in_class)          break;  // only allow for fields and classes
1783     if (!EnableContended || (RestrictContended && !privileged))    break;  // honor privileges
1784     return _sun_misc_Contended;
1785   default: break;
1786   }
1787   return AnnotationCollector::_unknown;
1788 }
1789 
1790 void ClassFileParser::FieldAnnotationCollector::apply_to(FieldInfo* f) {
1791   if (is_contended())
1792     f->set_contended_group(contended_group());
1793   if (is_stable())
1794     f->set_stable(true);
1795 }
1796 
1797 ClassFileParser::FieldAnnotationCollector::~FieldAnnotationCollector() {


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