< prev index next >

src/hotspot/share/classfile/classFileParser.hpp

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

@@ -127,10 +129,11 @@
    Array<u2>* _inner_classes;
    Array<u2>* _nest_members;
    u2 _nest_host;
    Array<u2>* _permitted_subclasses;
    Array<RecordComponent*>* _record_components;
+   GrowableArray<InstanceKlass*>* _temp_local_interfaces;
    Array<InstanceKlass*>* _local_interfaces;
    Array<InstanceKlass*>* _transitive_interfaces;
    Annotations* _combined_annotations;
    AnnotationArray* _class_annotations;
    AnnotationArray* _class_type_annotations;

@@ -152,10 +155,14 @@
    int _vtable_size;
    int _itable_size;
  
    int _num_miranda_methods;
  
+   int _alignment;
+   int _first_field_offset;
+   int _exact_size_in_bytes;
+ 
    ReferenceType _rt;
    Handle _protection_domain;
    AccessFlags _access_flags;
  
    // for tracing and notifications

@@ -190,10 +197,22 @@
    bool _has_nonstatic_concrete_methods;
    bool _declares_nonstatic_concrete_methods;
    bool _has_final_method;
    bool _has_contended_fields;
  
+   bool _has_inline_type_fields;
+   bool _has_nonstatic_fields;
+   bool _is_empty_inline_type;
+   bool _is_naturally_atomic;
+   bool _is_declared_atomic;
+   bool _invalid_inline_super;   // if true, invalid super type for an inline type.
+   bool _invalid_identity_super; // if true, invalid super type for an identity type.
+   bool _implements_identityObject;
+   bool _has_injected_identityObject;
+   bool _implements_primitiveObject;
+   bool _has_injected_primitiveObject;
+ 
    // precomputed flags
    bool _has_finalizer;
    bool _has_empty_finalizer;
    bool _has_vanilla_constructor;
    int _max_bootstrap_specifier_index;  // detects BSS values

@@ -237,10 +256,11 @@
    // Interface parsing
    void parse_interfaces(const ClassFileStream* const stream,
                          const int itfs_len,
                          ConstantPool* const cp,
                          bool* has_nonstatic_concrete_methods,
+                         bool* is_declared_atomic,
                          TRAPS);
  
    const InstanceKlass* parse_super_class(ConstantPool* const cp,
                                           const int super_class_index,
                                           const bool need_verify,

@@ -257,25 +277,28 @@
                                FieldAnnotationCollector* parsed_annotations,
                                TRAPS);
  
    void parse_fields(const ClassFileStream* const cfs,
                      bool is_interface,
+                     bool is_inline_type,
                      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_inline_type,
                         const ConstantPool* cp,
                         AccessFlags* const promoted_flags,
                         TRAPS);
  
    void parse_methods(const ClassFileStream* const cfs,
                       bool is_interface,
+                      bool is_inline_type,
                       AccessFlags* const promoted_flags,
                       bool* const has_final_method,
                       bool* const declares_nonstatic_concrete_methods,
                       TRAPS);
  

@@ -444,10 +467,15 @@
    void throwIllegalSignature(const char* type,
                               const Symbol* name,
                               const Symbol* sig,
                               TRAPS) const;
  
+   void throwInlineTypeLimitation(THREAD_AND_LOCATION_DECL,
+                                  const char* msg,
+                                  const Symbol* name = NULL,
+                                  const Symbol* sig  = NULL) const;
+ 
    void verify_constantvalue(const ConstantPool* const cp,
                              int constantvalue_index,
                              int signature_index,
                              TRAPS) const;
  

@@ -467,13 +495,17 @@
                                          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_field_modifiers(jint flags,
+                                     bool is_interface,
+                                     bool is_inline_type,
+                                     TRAPS) const;
    void verify_legal_method_modifiers(jint flags,
                                       bool is_interface,
+                                      bool is_inline_type,
                                       const Symbol* name,
                                       TRAPS) const;
  
    void check_super_class_access(const InstanceKlass* this_klass,
                                  TRAPS);

@@ -527,10 +559,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,

@@ -554,10 +589,20 @@
  
    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(); }
+   bool is_inline_type() const { return _access_flags.is_inline_type(); }
+   bool is_value_capable_class() const;
+   bool has_inline_fields() const { return _has_inline_type_fields; }
+   bool invalid_inline_super() const { return _invalid_inline_super; }
+   void set_invalid_inline_super() { _invalid_inline_super = true; }
+   bool invalid_identity_super() const { return _invalid_identity_super; }
+   void set_invalid_identity_super() { _invalid_identity_super = true; }
+   bool is_invalid_super_for_inline_type();
+ 
+   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; }
  
< prev index next >