< prev index next >

src/hotspot/share/classfile/classFileParser.cpp

Print this page




1529                                    u2* const java_fields_count_ptr,
1530                                    TRAPS) {
1531 
1532   assert(cfs != NULL, "invariant");
1533   assert(fac != NULL, "invariant");
1534   assert(cp != NULL, "invariant");
1535   assert(java_fields_count_ptr != NULL, "invariant");
1536 
1537   assert(NULL == _fields, "invariant");
1538   assert(NULL == _fields_annotations, "invariant");
1539   assert(NULL == _fields_type_annotations, "invariant");
1540 
1541   cfs->guarantee_more(2, CHECK);  // length
1542   const u2 length = cfs->get_u2_fast();
1543   *java_fields_count_ptr = length;
1544 
1545   int num_injected = 0;
1546   const InjectedField* const injected = JavaClasses::get_injected(_class_name,
1547                                                                   &num_injected);
1548 
1549   const int total_fields = length + num_injected + (is_value_type ? 1 : 0);
1550 
1551   // The field array starts with tuples of shorts
1552   // [access, name index, sig index, initial value index, byte offset].
1553   // A generic signature slot only exists for field with generic
1554   // signature attribute. And the access flag is set with
1555   // JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE for that field. The generic
1556   // signature slots are at the end of the field array and after all
1557   // other fields data.
1558   //
1559   //   f1: [access, name index, sig index, initial value index, low_offset, high_offset]
1560   //   f2: [access, name index, sig index, initial value index, low_offset, high_offset]
1561   //       ...
1562   //   fn: [access, name index, sig index, initial value index, low_offset, high_offset]
1563   //       [generic signature index]
1564   //       [generic signature index]
1565   //       ...
1566   //
1567   // Allocate a temporary resource array for field data. For each field,
1568   // a slot is reserved in the temporary array for the generic signature
1569   // index. After parsing all fields, the data are copied to a permanent
1570   // array and any unused slots will be discarded.
1571   ResourceMark rm(THREAD);
1572   u2* const fa = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD,
1573                                               u2,
1574                                               total_fields * (FieldInfo::field_slots + 1));
1575 
1576   // The generic signature slots start after all other fields' data.
1577   int generic_signature_slot = total_fields * FieldInfo::field_slots;
1578   int num_generic_signature = 0;

1579   for (int n = 0; n < length; n++) {
1580     // access_flags, name_index, descriptor_index, attributes_count
1581     cfs->guarantee_more(8, CHECK);
1582 
1583     jint recognized_modifiers = JVM_RECOGNIZED_FIELD_MODIFIERS;
1584 
1585     const jint flags = cfs->get_u2_fast() & recognized_modifiers;
1586     verify_legal_field_modifiers(flags, is_interface, is_value_type, CHECK);
1587     AccessFlags access_flags;
1588     access_flags.set_flags(flags);
1589 
1590     const u2 name_index = cfs->get_u2_fast();
1591     check_property(valid_symbol_at(name_index),
1592       "Invalid constant pool index %u for field name in class file %s",
1593       name_index, CHECK);
1594     const Symbol* const name = cp->symbol_at(name_index);
1595     verify_legal_field_name(name, CHECK);
1596 
1597     const u2 signature_index = cfs->get_u2_fast();
1598     check_property(valid_symbol_at(signature_index),
1599       "Invalid constant pool index %u for field signature in class file %s",
1600       signature_index, CHECK);
1601     const Symbol* const sig = cp->symbol_at(signature_index);
1602     verify_legal_field_signature(name, sig, CHECK);
1603     assert(!access_flags.is_flattenable(), "ACC_FLATTENABLE should have been filtered out");
1604     if (sig->is_Q_signature()) {
1605       // assert(_major_version >= CONSTANT_CLASS_DESCRIPTORS, "Q-descriptors are only supported in recent classfiles");
1606       access_flags.set_is_flattenable();
1607     }
1608     if (access_flags.is_flattenable()) {
1609       // Array flattenability cannot be specified.  Arrays of value classes are
1610       // are always flattenable.  Arrays of other classes are not flattenable.
1611       if (sig->utf8_length() > 1 && sig->char_at(0) == '[') {
1612         classfile_parse_error(
1613             "Field \"%s\" with signature \"%s\" in class file %s is invalid."
1614             " ACC_FLATTENABLE cannot be specified for an array",
1615             name->as_C_string(), sig->as_klass_external_name(), CHECK);
1616       }
1617       _has_flattenable_fields = true;
1618     }

1619 
1620     u2 constantvalue_index = 0;
1621     bool is_synthetic = false;
1622     u2 generic_signature_index = 0;
1623     const bool is_static = access_flags.is_static();
1624     FieldAnnotationCollector parsed_annotations(_loader_data);
1625 
1626     const u2 attributes_count = cfs->get_u2_fast();
1627     if (attributes_count > 0) {
1628       parse_field_attributes(cfs,
1629                              attributes_count,
1630                              is_static,
1631                              signature_index,
1632                              &constantvalue_index,
1633                              &is_synthetic,
1634                              &generic_signature_index,
1635                              &parsed_annotations,
1636                              CHECK);
1637 
1638       if (parsed_annotations.field_annotations() != NULL) {


1706         }
1707       }
1708 
1709       // Injected field
1710       FieldInfo* const field = FieldInfo::from_field_array(fa, index);
1711       field->initialize(JVM_ACC_FIELD_INTERNAL,
1712                         injected[n].name_index,
1713                         injected[n].signature_index,
1714                         0);
1715 
1716       const BasicType type = FieldType::basic_type(injected[n].signature());
1717 
1718       // Remember how many oops we encountered and compute allocation type
1719       const FieldAllocationType atype = fac->update(false, type, false);
1720       field->set_allocation_type(atype);
1721       index++;
1722     }
1723   }
1724 
1725   if (is_value_type) {
1726     index = length + num_injected;
1727     FieldInfo* const field = FieldInfo::from_field_array(fa, index);
1728     field->initialize(JVM_ACC_FIELD_INTERNAL | JVM_ACC_STATIC,
1729                       vmSymbols::default_value_name_enum,
1730                       vmSymbols::java_lang_Object_enum,
1731                       0);
1732     const BasicType type = FieldType::basic_type(vmSymbols::object_signature());
1733     const FieldAllocationType atype = fac->update(true, type, false);
1734     field->set_allocation_type(atype);
1735     index++;
1736   }
1737 













1738   assert(NULL == _fields, "invariant");
1739 
1740   _fields =
1741     MetadataFactory::new_array<u2>(_loader_data,
1742                                    index * FieldInfo::field_slots + num_generic_signature,
1743                                    CHECK);
1744   // Sometimes injected fields already exist in the Java source so
1745   // the fields array could be too long.  In that case the
1746   // fields array is trimed. Also unused slots that were reserved
1747   // for generic signature indexes are discarded.
1748   {
1749     int i = 0;
1750     for (; i < index * FieldInfo::field_slots; i++) {
1751       _fields->at_put(i, fa[i]);
1752     }
1753     for (int j = total_fields * FieldInfo::field_slots;
1754          j < generic_signature_slot; j++) {
1755       _fields->at_put(i++, fa[j]);
1756     }
1757     assert(_fields->length() == i, "");


5776   const bool publicize = !is_internal();
5777 
5778   _loader_data->add_class(ik, publicize);
5779 
5780   set_klass_to_deallocate(ik);
5781 
5782   assert(_field_info != NULL, "invariant");
5783   assert(ik->static_field_size() == _field_info->static_field_size, "sanity");
5784   assert(ik->nonstatic_oop_map_count() == _field_info->oop_map_blocks->nonstatic_oop_map_count,
5785     "sanity");
5786 
5787   assert(ik->is_instance_klass(), "sanity");
5788   assert(ik->size_helper() == _field_info->instance_size, "sanity");
5789 
5790   // Fill in information already parsed
5791   ik->set_should_verify_class(_need_verify);
5792 
5793   // Not yet: supers are done below to support the new subtype-checking fields
5794   ik->set_nonstatic_field_size(_field_info->nonstatic_field_size);
5795   ik->set_has_nonstatic_fields(_field_info->has_nonstatic_fields);



5796   assert(_fac != NULL, "invariant");
5797   ik->set_static_oop_field_count(_fac->count[STATIC_OOP] + _fac->count[STATIC_FLATTENABLE]);
5798 
5799   // this transfers ownership of a lot of arrays from
5800   // the parser onto the InstanceKlass*
5801   apply_parsed_class_metadata(ik, _java_fields_count, CHECK);
5802 
5803   // note that is not safe to use the fields in the parser from this point on
5804   assert(NULL == _cp, "invariant");
5805   assert(NULL == _fields, "invariant");
5806   assert(NULL == _methods, "invariant");
5807   assert(NULL == _inner_classes, "invariant");
5808   assert(NULL == _nest_members, "invariant");
5809   assert(NULL == _local_interfaces, "invariant");
5810   assert(NULL == _combined_annotations, "invariant");
5811 
5812   if (_has_final_method) {
5813     ik->set_has_final_method();
5814   }
5815 


5944     if (ik->field_is_flattenable(i)) {
5945       Symbol* klass_name = ik->field_signature(i)->fundamental_name(CHECK);
5946       // Inline classes for instance fields must have been pre-loaded
5947       // Inline classes for static fields might not have been loaded yet
5948       Klass* klass = SystemDictionary::find(klass_name,
5949           Handle(THREAD, ik->class_loader()),
5950           Handle(THREAD, ik->protection_domain()), CHECK);
5951       if (klass != NULL) {
5952         assert(klass->access_flags().is_value_type(), "Value type expected");
5953         ik->set_value_field_klass(i, klass);
5954       }
5955       klass_name->decrement_refcount();
5956     } else
5957       if (is_value_type() && ((ik->field_access_flags(i) & JVM_ACC_FIELD_INTERNAL) != 0)
5958         && ((ik->field_access_flags(i) & JVM_ACC_STATIC) != 0)) {
5959       ValueKlass::cast(ik)->set_default_value_offset(ik->field_offset(i));
5960     }
5961   }
5962 
5963   if (is_value_type()) {
5964     ValueKlass::cast(ik)->set_alignment(_alignment);
5965     ValueKlass::cast(ik)->set_first_field_offset(_first_field_offset);
5966     ValueKlass::cast(ik)->set_exact_size_in_bytes(_exact_size_in_bytes);





5967     ValueKlass::cast(ik)->initialize_calling_convention(CHECK);
5968   }
5969 
5970   ClassLoadingService::notify_class_loaded(ik, false /* not shared class */);
5971 
5972   if (!is_internal()) {
5973     if (log_is_enabled(Info, class, load)) {
5974       ResourceMark rm;
5975       const char* module_name = (module_entry->name() == NULL) ? UNNAMED_MODULE : module_entry->name()->as_C_string();
5976       ik->print_class_load_logging(_loader_data, module_name, _stream);
5977     }
5978 
5979     if (ik->minor_version() == JAVA_PREVIEW_MINOR_VERSION &&
5980         ik->major_version() == JVM_CLASSFILE_MAJOR_VERSION &&
5981         log_is_enabled(Info, class, preview)) {
5982       ResourceMark rm;
5983       log_info(class, preview)("Loading class %s that depends on preview features (class file version %d.65535)",
5984                                ik->external_name(), JVM_CLASSFILE_MAJOR_VERSION);
5985     }
5986 


6140   _access_flags(),
6141   _pub_level(pub_level),
6142   _bad_constant_seen(0),
6143   _synthetic_flag(false),
6144   _sde_length(false),
6145   _sde_buffer(NULL),
6146   _sourcefile_index(0),
6147   _generic_signature_index(0),
6148   _major_version(0),
6149   _minor_version(0),
6150   _this_class_index(0),
6151   _super_class_index(0),
6152   _itfs_len(0),
6153   _java_fields_count(0),
6154   _need_verify(false),
6155   _relax_verify(false),
6156   _has_nonstatic_concrete_methods(false),
6157   _declares_nonstatic_concrete_methods(false),
6158   _has_final_method(false),
6159   _has_flattenable_fields(false),

6160   _has_finalizer(false),
6161   _has_empty_finalizer(false),
6162   _has_vanilla_constructor(false),
6163   _max_bootstrap_specifier_index(-1) {
6164 
6165   _class_name = name != NULL ? name : vmSymbols::unknown_class_name();
6166   _class_name->increment_refcount();
6167 
6168   assert(THREAD->is_Java_thread(), "invariant");
6169   assert(_loader_data != NULL, "invariant");
6170   assert(stream != NULL, "invariant");
6171   assert(_stream != NULL, "invariant");
6172   assert(_stream->buffer() == _stream->current(), "invariant");
6173   assert(_class_name != NULL, "invariant");
6174   assert(0 == _access_flags.as_int(), "invariant");
6175 
6176   // Figure out whether we can skip format checking (matching classic VM behavior)
6177   if (DumpSharedSpaces) {
6178     // verify == true means it's a 'remote' class (i.e., non-boot class)
6179     // Verification decision is based on BytecodeVerificationRemote flag




1529                                    u2* const java_fields_count_ptr,
1530                                    TRAPS) {
1531 
1532   assert(cfs != NULL, "invariant");
1533   assert(fac != NULL, "invariant");
1534   assert(cp != NULL, "invariant");
1535   assert(java_fields_count_ptr != NULL, "invariant");
1536 
1537   assert(NULL == _fields, "invariant");
1538   assert(NULL == _fields_annotations, "invariant");
1539   assert(NULL == _fields_type_annotations, "invariant");
1540 
1541   cfs->guarantee_more(2, CHECK);  // length
1542   const u2 length = cfs->get_u2_fast();
1543   *java_fields_count_ptr = length;
1544 
1545   int num_injected = 0;
1546   const InjectedField* const injected = JavaClasses::get_injected(_class_name,
1547                                                                   &num_injected);
1548 
1549   const int total_fields = length + num_injected + (is_value_type ? 2 : 0);
1550 
1551   // The field array starts with tuples of shorts
1552   // [access, name index, sig index, initial value index, byte offset].
1553   // A generic signature slot only exists for field with generic
1554   // signature attribute. And the access flag is set with
1555   // JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE for that field. The generic
1556   // signature slots are at the end of the field array and after all
1557   // other fields data.
1558   //
1559   //   f1: [access, name index, sig index, initial value index, low_offset, high_offset]
1560   //   f2: [access, name index, sig index, initial value index, low_offset, high_offset]
1561   //       ...
1562   //   fn: [access, name index, sig index, initial value index, low_offset, high_offset]
1563   //       [generic signature index]
1564   //       [generic signature index]
1565   //       ...
1566   //
1567   // Allocate a temporary resource array for field data. For each field,
1568   // a slot is reserved in the temporary array for the generic signature
1569   // index. After parsing all fields, the data are copied to a permanent
1570   // array and any unused slots will be discarded.
1571   ResourceMark rm(THREAD);
1572   u2* const fa = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD,
1573                                               u2,
1574                                               total_fields * (FieldInfo::field_slots + 1));
1575 
1576   // The generic signature slots start after all other fields' data.
1577   int generic_signature_slot = total_fields * FieldInfo::field_slots;
1578   int num_generic_signature = 0;
1579   int instance_fields_count = 0;
1580   for (int n = 0; n < length; n++) {
1581     // access_flags, name_index, descriptor_index, attributes_count
1582     cfs->guarantee_more(8, CHECK);
1583 
1584     jint recognized_modifiers = JVM_RECOGNIZED_FIELD_MODIFIERS;
1585 
1586     const jint flags = cfs->get_u2_fast() & recognized_modifiers;
1587     verify_legal_field_modifiers(flags, is_interface, is_value_type, CHECK);
1588     AccessFlags access_flags;
1589     access_flags.set_flags(flags);
1590 
1591     const u2 name_index = cfs->get_u2_fast();
1592     check_property(valid_symbol_at(name_index),
1593       "Invalid constant pool index %u for field name in class file %s",
1594       name_index, CHECK);
1595     const Symbol* const name = cp->symbol_at(name_index);
1596     verify_legal_field_name(name, CHECK);
1597 
1598     const u2 signature_index = cfs->get_u2_fast();
1599     check_property(valid_symbol_at(signature_index),
1600       "Invalid constant pool index %u for field signature in class file %s",
1601       signature_index, CHECK);
1602     const Symbol* const sig = cp->symbol_at(signature_index);
1603     verify_legal_field_signature(name, sig, CHECK);
1604     assert(!access_flags.is_flattenable(), "ACC_FLATTENABLE should have been filtered out");
1605     if (sig->is_Q_signature()) {
1606       // assert(_major_version >= CONSTANT_CLASS_DESCRIPTORS, "Q-descriptors are only supported in recent classfiles");
1607       access_flags.set_is_flattenable();
1608     }
1609     if (access_flags.is_flattenable()) {
1610       // Array flattenability cannot be specified.  Arrays of value classes are
1611       // are always flattenable.  Arrays of other classes are not flattenable.
1612       if (sig->utf8_length() > 1 && sig->char_at(0) == '[') {
1613         classfile_parse_error(
1614             "Field \"%s\" with signature \"%s\" in class file %s is invalid."
1615             " ACC_FLATTENABLE cannot be specified for an array",
1616             name->as_C_string(), sig->as_klass_external_name(), CHECK);
1617       }
1618       _has_flattenable_fields = true;
1619     }
1620     if (!access_flags.is_static()) instance_fields_count++;
1621 
1622     u2 constantvalue_index = 0;
1623     bool is_synthetic = false;
1624     u2 generic_signature_index = 0;
1625     const bool is_static = access_flags.is_static();
1626     FieldAnnotationCollector parsed_annotations(_loader_data);
1627 
1628     const u2 attributes_count = cfs->get_u2_fast();
1629     if (attributes_count > 0) {
1630       parse_field_attributes(cfs,
1631                              attributes_count,
1632                              is_static,
1633                              signature_index,
1634                              &constantvalue_index,
1635                              &is_synthetic,
1636                              &generic_signature_index,
1637                              &parsed_annotations,
1638                              CHECK);
1639 
1640       if (parsed_annotations.field_annotations() != NULL) {


1708         }
1709       }
1710 
1711       // Injected field
1712       FieldInfo* const field = FieldInfo::from_field_array(fa, index);
1713       field->initialize(JVM_ACC_FIELD_INTERNAL,
1714                         injected[n].name_index,
1715                         injected[n].signature_index,
1716                         0);
1717 
1718       const BasicType type = FieldType::basic_type(injected[n].signature());
1719 
1720       // Remember how many oops we encountered and compute allocation type
1721       const FieldAllocationType atype = fac->update(false, type, false);
1722       field->set_allocation_type(atype);
1723       index++;
1724     }
1725   }
1726 
1727   if (is_value_type) {

1728     FieldInfo* const field = FieldInfo::from_field_array(fa, index);
1729     field->initialize(JVM_ACC_FIELD_INTERNAL | JVM_ACC_STATIC,
1730                       vmSymbols::default_value_name_enum,
1731                       vmSymbols::java_lang_Object_enum,
1732                       0);
1733     const BasicType type = FieldType::basic_type(vmSymbols::object_signature());
1734     const FieldAllocationType atype = fac->update(true, type, false);
1735     field->set_allocation_type(atype);
1736     index++;
1737   }
1738 
1739   if (is_value_type && instance_fields_count == 0) {
1740     _is_empty_value = true;
1741     FieldInfo* const field = FieldInfo::from_field_array(fa, index);
1742     field->initialize(JVM_ACC_FIELD_INTERNAL,
1743         vmSymbols::empty_marker_name_enum,
1744         vmSymbols::byte_signature_enum,
1745         0);
1746     const BasicType type = FieldType::basic_type(vmSymbols::byte_signature());
1747     const FieldAllocationType atype = fac->update(false, type, false);
1748     field->set_allocation_type(atype);
1749     index++;
1750   }
1751 
1752   assert(NULL == _fields, "invariant");
1753 
1754   _fields =
1755     MetadataFactory::new_array<u2>(_loader_data,
1756                                    index * FieldInfo::field_slots + num_generic_signature,
1757                                    CHECK);
1758   // Sometimes injected fields already exist in the Java source so
1759   // the fields array could be too long.  In that case the
1760   // fields array is trimed. Also unused slots that were reserved
1761   // for generic signature indexes are discarded.
1762   {
1763     int i = 0;
1764     for (; i < index * FieldInfo::field_slots; i++) {
1765       _fields->at_put(i, fa[i]);
1766     }
1767     for (int j = total_fields * FieldInfo::field_slots;
1768          j < generic_signature_slot; j++) {
1769       _fields->at_put(i++, fa[j]);
1770     }
1771     assert(_fields->length() == i, "");


5790   const bool publicize = !is_internal();
5791 
5792   _loader_data->add_class(ik, publicize);
5793 
5794   set_klass_to_deallocate(ik);
5795 
5796   assert(_field_info != NULL, "invariant");
5797   assert(ik->static_field_size() == _field_info->static_field_size, "sanity");
5798   assert(ik->nonstatic_oop_map_count() == _field_info->oop_map_blocks->nonstatic_oop_map_count,
5799     "sanity");
5800 
5801   assert(ik->is_instance_klass(), "sanity");
5802   assert(ik->size_helper() == _field_info->instance_size, "sanity");
5803 
5804   // Fill in information already parsed
5805   ik->set_should_verify_class(_need_verify);
5806 
5807   // Not yet: supers are done below to support the new subtype-checking fields
5808   ik->set_nonstatic_field_size(_field_info->nonstatic_field_size);
5809   ik->set_has_nonstatic_fields(_field_info->has_nonstatic_fields);
5810   if (_is_empty_value) {
5811     ik->set_is_empty_value();
5812   }
5813   assert(_fac != NULL, "invariant");
5814   ik->set_static_oop_field_count(_fac->count[STATIC_OOP] + _fac->count[STATIC_FLATTENABLE]);
5815 
5816   // this transfers ownership of a lot of arrays from
5817   // the parser onto the InstanceKlass*
5818   apply_parsed_class_metadata(ik, _java_fields_count, CHECK);
5819 
5820   // note that is not safe to use the fields in the parser from this point on
5821   assert(NULL == _cp, "invariant");
5822   assert(NULL == _fields, "invariant");
5823   assert(NULL == _methods, "invariant");
5824   assert(NULL == _inner_classes, "invariant");
5825   assert(NULL == _nest_members, "invariant");
5826   assert(NULL == _local_interfaces, "invariant");
5827   assert(NULL == _combined_annotations, "invariant");
5828 
5829   if (_has_final_method) {
5830     ik->set_has_final_method();
5831   }
5832 


5961     if (ik->field_is_flattenable(i)) {
5962       Symbol* klass_name = ik->field_signature(i)->fundamental_name(CHECK);
5963       // Inline classes for instance fields must have been pre-loaded
5964       // Inline classes for static fields might not have been loaded yet
5965       Klass* klass = SystemDictionary::find(klass_name,
5966           Handle(THREAD, ik->class_loader()),
5967           Handle(THREAD, ik->protection_domain()), CHECK);
5968       if (klass != NULL) {
5969         assert(klass->access_flags().is_value_type(), "Value type expected");
5970         ik->set_value_field_klass(i, klass);
5971       }
5972       klass_name->decrement_refcount();
5973     } else
5974       if (is_value_type() && ((ik->field_access_flags(i) & JVM_ACC_FIELD_INTERNAL) != 0)
5975         && ((ik->field_access_flags(i) & JVM_ACC_STATIC) != 0)) {
5976       ValueKlass::cast(ik)->set_default_value_offset(ik->field_offset(i));
5977     }
5978   }
5979 
5980   if (is_value_type()) {
5981     ValueKlass* vk = ValueKlass::cast(ik);
5982     if (UseNewLayout) {
5983       vk->set_alignment(_alignment);
5984       vk->set_first_field_offset(_first_field_offset);
5985       vk->set_exact_size_in_bytes(_exact_size_in_bytes);
5986     } else {
5987       vk->set_first_field_offset(vk->first_field_offset_old());
5988     }
5989     ValueKlass::cast(ik)->initialize_calling_convention(CHECK);
5990   }
5991 
5992   ClassLoadingService::notify_class_loaded(ik, false /* not shared class */);
5993 
5994   if (!is_internal()) {
5995     if (log_is_enabled(Info, class, load)) {
5996       ResourceMark rm;
5997       const char* module_name = (module_entry->name() == NULL) ? UNNAMED_MODULE : module_entry->name()->as_C_string();
5998       ik->print_class_load_logging(_loader_data, module_name, _stream);
5999     }
6000 
6001     if (ik->minor_version() == JAVA_PREVIEW_MINOR_VERSION &&
6002         ik->major_version() == JVM_CLASSFILE_MAJOR_VERSION &&
6003         log_is_enabled(Info, class, preview)) {
6004       ResourceMark rm;
6005       log_info(class, preview)("Loading class %s that depends on preview features (class file version %d.65535)",
6006                                ik->external_name(), JVM_CLASSFILE_MAJOR_VERSION);
6007     }
6008 


6162   _access_flags(),
6163   _pub_level(pub_level),
6164   _bad_constant_seen(0),
6165   _synthetic_flag(false),
6166   _sde_length(false),
6167   _sde_buffer(NULL),
6168   _sourcefile_index(0),
6169   _generic_signature_index(0),
6170   _major_version(0),
6171   _minor_version(0),
6172   _this_class_index(0),
6173   _super_class_index(0),
6174   _itfs_len(0),
6175   _java_fields_count(0),
6176   _need_verify(false),
6177   _relax_verify(false),
6178   _has_nonstatic_concrete_methods(false),
6179   _declares_nonstatic_concrete_methods(false),
6180   _has_final_method(false),
6181   _has_flattenable_fields(false),
6182   _is_empty_value(false),
6183   _has_finalizer(false),
6184   _has_empty_finalizer(false),
6185   _has_vanilla_constructor(false),
6186   _max_bootstrap_specifier_index(-1) {
6187 
6188   _class_name = name != NULL ? name : vmSymbols::unknown_class_name();
6189   _class_name->increment_refcount();
6190 
6191   assert(THREAD->is_Java_thread(), "invariant");
6192   assert(_loader_data != NULL, "invariant");
6193   assert(stream != NULL, "invariant");
6194   assert(_stream != NULL, "invariant");
6195   assert(_stream->buffer() == _stream->current(), "invariant");
6196   assert(_class_name != NULL, "invariant");
6197   assert(0 == _access_flags.as_int(), "invariant");
6198 
6199   // Figure out whether we can skip format checking (matching classic VM behavior)
6200   if (DumpSharedSpaces) {
6201     // verify == true means it's a 'remote' class (i.e., non-boot class)
6202     // Verification decision is based on BytecodeVerificationRemote flag


< prev index next >