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 // two more slots are required for inline classes:
1550 // one for the static field with a reference to the pre-allocated default value
1551 // one for the field the JVM injects when detecting an empty inline class
1552 const int total_fields = length + num_injected + (is_value_type ? 2 : 0);
1553
1554 // The field array starts with tuples of shorts
1555 // [access, name index, sig index, initial value index, byte offset].
1556 // A generic signature slot only exists for field with generic
1557 // signature attribute. And the access flag is set with
1558 // JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE for that field. The generic
1559 // signature slots are at the end of the field array and after all
1560 // other fields data.
1561 //
1562 // f1: [access, name index, sig index, initial value index, low_offset, high_offset]
1563 // f2: [access, name index, sig index, initial value index, low_offset, high_offset]
1564 // ...
1565 // fn: [access, name index, sig index, initial value index, low_offset, high_offset]
1566 // [generic signature index]
1567 // [generic signature index]
1568 // ...
1569 //
1570 // Allocate a temporary resource array for field data. For each field,
1571 // a slot is reserved in the temporary array for the generic signature
1572 // index. After parsing all fields, the data are copied to a permanent
1573 // array and any unused slots will be discarded.
1574 ResourceMark rm(THREAD);
1575 u2* const fa = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD,
1576 u2,
1577 total_fields * (FieldInfo::field_slots + 1));
1578
1579 // The generic signature slots start after all other fields' data.
1580 int generic_signature_slot = total_fields * FieldInfo::field_slots;
1581 int num_generic_signature = 0;
1582 int instance_fields_count = 0;
1583 for (int n = 0; n < length; n++) {
1584 // access_flags, name_index, descriptor_index, attributes_count
1585 cfs->guarantee_more(8, CHECK);
1586
1587 jint recognized_modifiers = JVM_RECOGNIZED_FIELD_MODIFIERS;
1588
1589 const jint flags = cfs->get_u2_fast() & recognized_modifiers;
1590 verify_legal_field_modifiers(flags, is_interface, is_value_type, CHECK);
1591 AccessFlags access_flags;
1592 access_flags.set_flags(flags);
1593
1594 const u2 name_index = cfs->get_u2_fast();
1595 check_property(valid_symbol_at(name_index),
1596 "Invalid constant pool index %u for field name in class file %s",
1597 name_index, CHECK);
1598 const Symbol* const name = cp->symbol_at(name_index);
1599 verify_legal_field_name(name, CHECK);
1600
1601 const u2 signature_index = cfs->get_u2_fast();
1602 check_property(valid_symbol_at(signature_index),
1603 "Invalid constant pool index %u for field signature in class file %s",
1604 signature_index, CHECK);
1605 const Symbol* const sig = cp->symbol_at(signature_index);
1606 verify_legal_field_signature(name, sig, CHECK);
1607 assert(!access_flags.is_flattenable(), "ACC_FLATTENABLE should have been filtered out");
1608 if (sig->is_Q_signature()) {
1609 // assert(_major_version >= CONSTANT_CLASS_DESCRIPTORS, "Q-descriptors are only supported in recent classfiles");
1610 access_flags.set_is_flattenable();
1611 }
1612 if (access_flags.is_flattenable()) {
1613 // Array flattenability cannot be specified. Arrays of value classes are
1614 // are always flattenable. Arrays of other classes are not flattenable.
1615 if (sig->utf8_length() > 1 && sig->char_at(0) == '[') {
1616 classfile_parse_error(
1617 "Field \"%s\" with signature \"%s\" in class file %s is invalid."
1618 " ACC_FLATTENABLE cannot be specified for an array",
1619 name->as_C_string(), sig->as_klass_external_name(), CHECK);
1620 }
1621 _has_flattenable_fields = true;
1622 }
1623 if (!access_flags.is_static()) instance_fields_count++;
1624
1625 u2 constantvalue_index = 0;
1626 bool is_synthetic = false;
1627 u2 generic_signature_index = 0;
1628 const bool is_static = access_flags.is_static();
1629 FieldAnnotationCollector parsed_annotations(_loader_data);
1630
1631 const u2 attributes_count = cfs->get_u2_fast();
1632 if (attributes_count > 0) {
1633 parse_field_attributes(cfs,
1634 attributes_count,
1635 is_static,
1636 signature_index,
1637 &constantvalue_index,
1638 &is_synthetic,
1639 &generic_signature_index,
1640 &parsed_annotations,
1641 CHECK);
1642
1643 if (parsed_annotations.field_annotations() != NULL) {
1711 }
1712 }
1713
1714 // Injected field
1715 FieldInfo* const field = FieldInfo::from_field_array(fa, index);
1716 field->initialize(JVM_ACC_FIELD_INTERNAL,
1717 injected[n].name_index,
1718 injected[n].signature_index,
1719 0);
1720
1721 const BasicType type = FieldType::basic_type(injected[n].signature());
1722
1723 // Remember how many oops we encountered and compute allocation type
1724 const FieldAllocationType atype = fac->update(false, type, false);
1725 field->set_allocation_type(atype);
1726 index++;
1727 }
1728 }
1729
1730 if (is_value_type) {
1731 FieldInfo* const field = FieldInfo::from_field_array(fa, index);
1732 field->initialize(JVM_ACC_FIELD_INTERNAL | JVM_ACC_STATIC,
1733 vmSymbols::default_value_name_enum,
1734 vmSymbols::java_lang_Object_enum,
1735 0);
1736 const BasicType type = FieldType::basic_type(vmSymbols::object_signature());
1737 const FieldAllocationType atype = fac->update(true, type, false);
1738 field->set_allocation_type(atype);
1739 index++;
1740 }
1741
1742 if (is_value_type && instance_fields_count == 0) {
1743 _is_empty_value = true;
1744 FieldInfo* const field = FieldInfo::from_field_array(fa, index);
1745 field->initialize(JVM_ACC_FIELD_INTERNAL,
1746 vmSymbols::empty_marker_name_enum,
1747 vmSymbols::byte_signature_enum,
1748 0);
1749 const BasicType type = FieldType::basic_type(vmSymbols::byte_signature());
1750 const FieldAllocationType atype = fac->update(false, type, false);
1751 field->set_allocation_type(atype);
1752 index++;
1753 }
1754
1755 assert(NULL == _fields, "invariant");
1756
1757 _fields =
1758 MetadataFactory::new_array<u2>(_loader_data,
1759 index * FieldInfo::field_slots + num_generic_signature,
1760 CHECK);
1761 // Sometimes injected fields already exist in the Java source so
1762 // the fields array could be too long. In that case the
1763 // fields array is trimed. Also unused slots that were reserved
1764 // for generic signature indexes are discarded.
1765 {
1766 int i = 0;
1767 for (; i < index * FieldInfo::field_slots; i++) {
1768 _fields->at_put(i, fa[i]);
1769 }
1770 for (int j = total_fields * FieldInfo::field_slots;
1771 j < generic_signature_slot; j++) {
1772 _fields->at_put(i++, fa[j]);
1773 }
1774 assert(_fields->length() == i, "");
5793 const bool publicize = !is_internal();
5794
5795 _loader_data->add_class(ik, publicize);
5796
5797 set_klass_to_deallocate(ik);
5798
5799 assert(_field_info != NULL, "invariant");
5800 assert(ik->static_field_size() == _field_info->static_field_size, "sanity");
5801 assert(ik->nonstatic_oop_map_count() == _field_info->oop_map_blocks->nonstatic_oop_map_count,
5802 "sanity");
5803
5804 assert(ik->is_instance_klass(), "sanity");
5805 assert(ik->size_helper() == _field_info->instance_size, "sanity");
5806
5807 // Fill in information already parsed
5808 ik->set_should_verify_class(_need_verify);
5809
5810 // Not yet: supers are done below to support the new subtype-checking fields
5811 ik->set_nonstatic_field_size(_field_info->nonstatic_field_size);
5812 ik->set_has_nonstatic_fields(_field_info->has_nonstatic_fields);
5813 if (_is_empty_value) {
5814 ik->set_is_empty_value();
5815 }
5816 assert(_fac != NULL, "invariant");
5817 ik->set_static_oop_field_count(_fac->count[STATIC_OOP] + _fac->count[STATIC_FLATTENABLE]);
5818
5819 // this transfers ownership of a lot of arrays from
5820 // the parser onto the InstanceKlass*
5821 apply_parsed_class_metadata(ik, _java_fields_count, CHECK);
5822
5823 // note that is not safe to use the fields in the parser from this point on
5824 assert(NULL == _cp, "invariant");
5825 assert(NULL == _fields, "invariant");
5826 assert(NULL == _methods, "invariant");
5827 assert(NULL == _inner_classes, "invariant");
5828 assert(NULL == _nest_members, "invariant");
5829 assert(NULL == _local_interfaces, "invariant");
5830 assert(NULL == _combined_annotations, "invariant");
5831
5832 if (_has_final_method) {
5833 ik->set_has_final_method();
5834 }
5835
5964 if (ik->field_is_flattenable(i)) {
5965 Symbol* klass_name = ik->field_signature(i)->fundamental_name(CHECK);
5966 // Inline classes for instance fields must have been pre-loaded
5967 // Inline classes for static fields might not have been loaded yet
5968 Klass* klass = SystemDictionary::find(klass_name,
5969 Handle(THREAD, ik->class_loader()),
5970 Handle(THREAD, ik->protection_domain()), CHECK);
5971 if (klass != NULL) {
5972 assert(klass->access_flags().is_value_type(), "Value type expected");
5973 ik->set_value_field_klass(i, klass);
5974 }
5975 klass_name->decrement_refcount();
5976 } else
5977 if (is_value_type() && ((ik->field_access_flags(i) & JVM_ACC_FIELD_INTERNAL) != 0)
5978 && ((ik->field_access_flags(i) & JVM_ACC_STATIC) != 0)) {
5979 ValueKlass::cast(ik)->set_default_value_offset(ik->field_offset(i));
5980 }
5981 }
5982
5983 if (is_value_type()) {
5984 ValueKlass* vk = ValueKlass::cast(ik);
5985 if (UseNewLayout) {
5986 vk->set_alignment(_alignment);
5987 vk->set_first_field_offset(_first_field_offset);
5988 vk->set_exact_size_in_bytes(_exact_size_in_bytes);
5989 } else {
5990 vk->set_first_field_offset(vk->first_field_offset_old());
5991 }
5992 ValueKlass::cast(ik)->initialize_calling_convention(CHECK);
5993 }
5994
5995 ClassLoadingService::notify_class_loaded(ik, false /* not shared class */);
5996
5997 if (!is_internal()) {
5998 if (log_is_enabled(Info, class, load)) {
5999 ResourceMark rm;
6000 const char* module_name = (module_entry->name() == NULL) ? UNNAMED_MODULE : module_entry->name()->as_C_string();
6001 ik->print_class_load_logging(_loader_data, module_name, _stream);
6002 }
6003
6004 if (ik->minor_version() == JAVA_PREVIEW_MINOR_VERSION &&
6005 ik->major_version() == JVM_CLASSFILE_MAJOR_VERSION &&
6006 log_is_enabled(Info, class, preview)) {
6007 ResourceMark rm;
6008 log_info(class, preview)("Loading class %s that depends on preview features (class file version %d.65535)",
6009 ik->external_name(), JVM_CLASSFILE_MAJOR_VERSION);
6010 }
6011
6165 _access_flags(),
6166 _pub_level(pub_level),
6167 _bad_constant_seen(0),
6168 _synthetic_flag(false),
6169 _sde_length(false),
6170 _sde_buffer(NULL),
6171 _sourcefile_index(0),
6172 _generic_signature_index(0),
6173 _major_version(0),
6174 _minor_version(0),
6175 _this_class_index(0),
6176 _super_class_index(0),
6177 _itfs_len(0),
6178 _java_fields_count(0),
6179 _need_verify(false),
6180 _relax_verify(false),
6181 _has_nonstatic_concrete_methods(false),
6182 _declares_nonstatic_concrete_methods(false),
6183 _has_final_method(false),
6184 _has_flattenable_fields(false),
6185 _is_empty_value(false),
6186 _has_finalizer(false),
6187 _has_empty_finalizer(false),
6188 _has_vanilla_constructor(false),
6189 _max_bootstrap_specifier_index(-1) {
6190
6191 _class_name = name != NULL ? name : vmSymbols::unknown_class_name();
6192 _class_name->increment_refcount();
6193
6194 assert(THREAD->is_Java_thread(), "invariant");
6195 assert(_loader_data != NULL, "invariant");
6196 assert(stream != NULL, "invariant");
6197 assert(_stream != NULL, "invariant");
6198 assert(_stream->buffer() == _stream->current(), "invariant");
6199 assert(_class_name != NULL, "invariant");
6200 assert(0 == _access_flags.as_int(), "invariant");
6201
6202 // Figure out whether we can skip format checking (matching classic VM behavior)
6203 if (DumpSharedSpaces) {
6204 // verify == true means it's a 'remote' class (i.e., non-boot class)
6205 // Verification decision is based on BytecodeVerificationRemote flag
|