< prev index next > src/hotspot/share/classfile/classFileParser.hpp
Print this page
public:
OopMapBlocksBuilder* oop_map_blocks;
int _instance_size;
int _nonstatic_field_size;
int _static_field_size;
- bool _has_nonstatic_fields;
+ int _payload_alignment;
+ int _first_field_offset;
+ int _payload_size_in_bytes;
+ int _non_atomic_size_in_bytes;
+ int _non_atomic_alignment;
+ int _atomic_layout_size_in_bytes;
+ int _nullable_layout_size_in_bytes;
+ int _null_marker_offset;
+ int _default_value_offset;
+ int _null_reset_value_offset;
+ bool _has_nonstatic_fields;
+ bool _is_naturally_atomic;
+ bool _must_be_atomic;
+ bool _has_inline_fields;
+ bool _is_empty_inline_klass;
};
// Parser for for .class files
//
// The bytes describing the class file structure is read from a Stream object
Array<Method*>* _methods;
Array<u2>* _inner_classes;
Array<u2>* _nest_members;
u2 _nest_host;
Array<u2>* _permitted_subclasses;
+ Array<u2>* _loadable_descriptors;
Array<RecordComponent*>* _record_components;
Array<InstanceKlass*>* _local_interfaces;
+ GrowableArray<u2>* _local_interface_indexes;
Array<InstanceKlass*>* _transitive_interfaces;
Annotations* _combined_annotations;
AnnotationArray* _class_annotations;
AnnotationArray* _class_type_annotations;
Array<AnnotationArray*>* _fields_annotations;
Array<AnnotationArray*>* _fields_type_annotations;
InstanceKlass* _klass; // InstanceKlass* once created.
InstanceKlass* _klass_to_deallocate; // an InstanceKlass* to be destroyed
ClassAnnotationCollector* _parsed_annotations;
- FieldLayoutInfo* _field_info;
+ FieldLayoutInfo* _layout_info;
+ Array<InlineLayoutInfo>* _inline_layout_info_array;
GrowableArray<FieldInfo>* _temp_field_info;
const intArray* _method_ordering;
GrowableArray<Method*>* _all_mirandas;
enum { fixed_buffer_size = 128 };
int _vtable_size;
int _itable_size;
int _num_miranda_methods;
+
Handle _protection_domain;
AccessFlags _access_flags;
// for tracing and notifications
Publicity _pub_level;
bool _declares_nonstatic_concrete_methods;
bool _has_localvariable_table;
bool _has_final_method;
bool _has_contended_fields;
+ bool _has_inline_type_fields;
+ bool _has_null_marker_offsets;
+ bool _is_naturally_atomic;
+ bool _must_be_atomic;
+ bool _is_implicitly_constructible;
+ bool _has_loosely_consistent_annotation;
+ bool _has_implicitly_constructible_annotation;
+
// precomputed flags
bool _has_finalizer;
bool _has_empty_finalizer;
int _max_bootstrap_specifier_index; // detects BSS values
u2* const generic_signature_index_addr,
FieldAnnotationCollector* parsed_annotations,
TRAPS);
void parse_fields(const ClassFileStream* const cfs,
- bool is_interface,
+ AccessFlags class_access_flags,
ConstantPool* cp,
const int cp_size,
u2* const java_fields_count_ptr,
TRAPS);
// Method parsing
Method* parse_method(const ClassFileStream* const cfs,
bool is_interface,
+ bool is_value_class,
+ bool is_abstract_class,
const ConstantPool* cp,
bool* const has_localvariable_table,
TRAPS);
void parse_methods(const ClassFileStream* const cfs,
bool is_interface,
+ bool is_value_class,
+ bool is_abstract_class,
bool* const has_localvariable_table,
bool* const has_final_method,
bool* const declares_nonstatic_concrete_methods,
TRAPS);
u2 parse_classfile_permitted_subclasses_attribute(const ClassFileStream* const cfs,
const u1* const permitted_subclasses_attribute_start,
TRAPS);
+ u2 parse_classfile_loadable_descriptors_attribute(const ClassFileStream* const cfs,
+ const u1* const loadable_descriptors_attribute_start,
+ TRAPS);
+
u4 parse_classfile_record_attribute(const ClassFileStream* const cfs,
const ConstantPool* cp,
const u1* const record_attribute_start,
TRAPS);
void verify_legal_utf8(const unsigned char* buffer, int length, TRAPS) const;
void verify_legal_class_name(const Symbol* name, TRAPS) const;
void verify_legal_field_name(const Symbol* name, TRAPS) const;
void verify_legal_method_name(const Symbol* name, TRAPS) const;
+ bool legal_field_signature(const Symbol* signature, TRAPS) const;
+
void verify_legal_field_signature(const Symbol* fieldname,
const Symbol* signature,
TRAPS) const;
int verify_legal_method_signature(const Symbol* methodname,
const Symbol* signature,
const Symbol* signature,
TRAPS) const;
void verify_class_version(u2 major, u2 minor, Symbol* class_name, TRAPS);
- void verify_legal_class_modifiers(jint flags, TRAPS) const;
- void verify_legal_field_modifiers(jint flags, bool is_interface, TRAPS) const;
+ void verify_legal_class_modifiers(jint flags, const char* name, bool is_Object, TRAPS) const;
+ void verify_legal_field_modifiers(jint flags,
+ AccessFlags class_access_flags,
+ TRAPS) const;
void verify_legal_method_modifiers(jint flags,
- bool is_interface,
+ AccessFlags class_access_flags,
const Symbol* name,
TRAPS) const;
void check_super_class_access(const InstanceKlass* this_klass,
TRAPS);
int annotation_default_length,
TRAPS);
void update_class_name(Symbol* new_name);
+ // Check if the class file supports inline types
+ bool supports_inline_types() const;
+
public:
ClassFileParser(ClassFileStream* stream,
Symbol* name,
ClassLoaderData* loader_data,
const ClassLoadInfo* cl_info,
u2 this_class_index() const { return _this_class_index; }
bool is_hidden() const { return _is_hidden; }
bool is_interface() const { return _access_flags.is_interface(); }
+ // Being an inline type means being a concrete value class
+ bool is_inline_type() const { return !_access_flags.is_identity_class() && !_access_flags.is_interface() && !_access_flags.is_abstract(); }
+ bool is_abstract_class() const { return _access_flags.is_abstract(); }
+ bool is_identity_class() const { return _access_flags.is_identity_class(); }
+ bool has_inline_fields() const { return _has_inline_type_fields; }
+
+ u2 java_fields_count() const { return _java_fields_count; }
bool is_abstract() const { return _access_flags.is_abstract(); }
ClassLoaderData* loader_data() const { return _loader_data; }
const Symbol* class_name() const { return _class_name; }
const InstanceKlass* super_klass() const { return _super_klass; }
AccessFlags access_flags() const { return _access_flags; }
bool is_internal() const { return INTERNAL == _pub_level; }
+ bool is_class_in_loadable_descriptors_attribute(Symbol *klass);
+
static bool verify_unqualified_name(const char* name, unsigned int length, int type);
#ifdef ASSERT
static bool is_internal_format(Symbol* class_name);
#endif
< prev index next >