< prev index next >

src/share/vm/classfile/classFileParser.cpp

Print this page

        

*** 1715,1724 **** --- 1715,1739 ---- group_index = 0; // default contended group } } coll->set_contended_group(group_index); } + // The Accessor-Annotation specifies the field name it + // belongs to. The index of the symbol is later stored in + // the method. + if (id == AnnotationCollector::_method_Accessor_Method) { + u2 group_index = 0; + if (count == 1 + && s_size == (index - index0) // match size + && s_tag_val == *(abase + tag_off) + && member == vmSymbols::value_name()) { + group_index = Bytes::get_Java_u2(abase + s_con_off); + if (_cp->symbol_at(group_index)->utf8_length() != 0) { + coll->set_accessor_field_name(group_index); + } + } + } } } ClassFileParser::AnnotationCollector::ID ClassFileParser::AnnotationCollector::annotation_index(ClassLoaderData* loader_data,
*** 1755,1764 **** --- 1770,1782 ---- return _method_LambdaForm_Hidden; case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_HotSpotIntrinsicCandidate_signature): if (_location != _in_method) break; // only allow for methods if (!privileged) break; // only allow in privileged code return _method_HotSpotIntrinsicCandidate; + case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_reflect_Accessor_signature): + if (_location != _in_method) break; // only allow for methods + return _method_Accessor_Method; #if INCLUDE_JVMCI case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_vm_ci_hotspot_Stable_signature): if (_location != _in_field) break; // only allow for fields if (!privileged) break; // only allow in privileged code return _field_Stable;
*** 1802,1811 **** --- 1820,1832 ---- m->set_intrinsic_id(vmIntrinsics::_compiledLambdaForm); if (has_annotation(_method_LambdaForm_Hidden)) m->set_hidden(true); if (has_annotation(_method_HotSpotIntrinsicCandidate) && !m->is_synthetic()) m->set_intrinsic_candidate(true); + if (is_accessor()) { + m->set_accessor_field_name(accessor_field_name()); + } } void ClassFileParser::ClassAnnotationCollector::apply_to(instanceKlassHandle k) { k->set_is_contended(is_contended()); }
< prev index next >