< prev index next >

src/hotspot/share/classfile/classFileParser.hpp

Print this page
@@ -72,11 +72,14 @@
   public:
    OopMapBlocksBuilder* oop_map_blocks;
    int _instance_size;
    int _nonstatic_field_size;
    int _static_field_size;
-   bool  _has_nonstatic_fields;
+   bool _has_nonstatic_fields;
+   bool _is_naturally_atomic;
+   bool _has_inline_fields;
+   bool _has_null_marker_offsets;
  };
  
  // Parser for for .class files
  //
  // The bytes describing the class file structure is read from a Stream object

@@ -127,12 +130,14 @@
    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;

@@ -141,10 +146,12 @@
    InstanceKlass* _klass_to_deallocate; // an InstanceKlass* to be destroyed
  
    ClassAnnotationCollector* _parsed_annotations;
    FieldAllocationCount* _fac;
    FieldLayoutInfo* _field_info;
+   Array<InlineKlass*>* _inline_type_field_klasses;
+   Array<int>* _null_marker_offsets;
    GrowableArray<FieldInfo>* _temp_field_info;
    const intArray* _method_ordering;
    GrowableArray<Method*>* _all_mirandas;
  
    enum { fixed_buffer_size = 128 };

@@ -154,10 +161,15 @@
    int _vtable_size;
    int _itable_size;
  
    int _num_miranda_methods;
  
+   int _alignment;
+   int _first_field_offset;
+   int _payload_size_in_bytes;
+   int _internal_null_marker_offset;
+ 
    Handle _protection_domain;
    AccessFlags _access_flags;
  
    // for tracing and notifications
    Publicity _pub_level;

@@ -192,10 +204,20 @@
    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 _has_nonstatic_fields;
+   bool _is_empty_inline_type;
+   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;
    bool _has_vanilla_constructor;
    int _max_bootstrap_specifier_index;  // detects BSS values

@@ -258,26 +280,30 @@
                                u2* const generic_signature_index_addr,
                                FieldAnnotationCollector* parsed_annotations,
                                TRAPS);
  
    void parse_fields(const ClassFileStream* const cfs,
-                     bool is_interface,
+                     AccessFlags class_access_flags,
                      FieldAllocationCount* const fac,
                      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);
  

@@ -328,10 +354,14 @@
  
    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 preload_attribute_start,
+                                                     TRAPS);
+ 
    u4 parse_classfile_record_attribute(const ClassFileStream* const cfs,
                                        const ConstantPool* cp,
                                        const u1* const record_attribute_start,
                                        TRAPS);
  

@@ -456,10 +486,12 @@
    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,

@@ -468,14 +500,16 @@
                                          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);

@@ -529,10 +563,13 @@
                                 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,

@@ -556,10 +593,17 @@
  
    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; }
  
    ClassLoaderData* loader_data() const { return _loader_data; }
    const Symbol* class_name() const { return _class_name; }
    const InstanceKlass* super_klass() const { return _super_klass; }
  

@@ -569,10 +613,12 @@
  
    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 >