< prev index next >

src/hotspot/share/classfile/classFileParser.hpp

Print this page

 55  public:
 56   OopMapBlock* _nonstatic_oop_maps;
 57   unsigned int _nonstatic_oop_map_count;
 58   unsigned int _max_nonstatic_oop_maps;
 59 
 60   OopMapBlocksBuilder(unsigned int  max_blocks);
 61   OopMapBlock* last_oop_map() const;
 62   void initialize_inherited_blocks(OopMapBlock* blocks, unsigned int nof_blocks);
 63   void add(int offset, int count);
 64   void copy(OopMapBlock* dst);
 65   void compact();
 66   void print_on(outputStream* st) const;
 67   void print_value_on(outputStream* st) const;
 68 };
 69 
 70 // Values needed for oopmap and InstanceKlass creation
 71 class FieldLayoutInfo : public ResourceObj {
 72  public:
 73   OopMapBlocksBuilder* oop_map_blocks;
 74   int _instance_size;

 75   int _nonstatic_field_size;
 76   int _static_field_size;
 77   bool  _has_nonstatic_fields;
 78 };
 79 
 80 // Parser for for .class files
 81 //
 82 // The bytes describing the class file structure is read from a Stream object
 83 
 84 class ClassFileParser {
 85   friend class FieldLayoutBuilder;
 86   friend class FieldLayout;
 87 
 88   class ClassAnnotationCollector;
 89   class FieldAnnotationCollector;
 90 
 91  public:
 92   // The ClassFileParser has an associated "publicity" level
 93   // It is used to control which subsystems (if any)
 94   // will observe the parsing (logging, events, tracing).

483 
484  public:
485   ClassFileParser(ClassFileStream* stream,
486                   Symbol* name,
487                   ClassLoaderData* loader_data,
488                   const ClassLoadInfo* cl_info,
489                   Publicity pub_level,
490                   TRAPS);
491 
492   ~ClassFileParser();
493 
494   InstanceKlass* create_instance_klass(bool cf_changed_in_CFLH, const ClassInstanceInfo& cl_inst_info, TRAPS);
495 
496   const ClassFileStream* clone_stream() const;
497 
498   void set_klass_to_deallocate(InstanceKlass* klass);
499 
500   int static_field_size() const;
501   int total_oop_map_count() const;
502   jint layout_size() const;

503 
504   int vtable_size() const { return _vtable_size; }
505   int itable_size() const { return _itable_size; }
506 
507   u2 this_class_index() const { return _this_class_index; }
508 
509   bool is_hidden() const { return _is_hidden; }
510   bool is_interface() const { return _access_flags.is_interface(); }
511   bool is_abstract() const { return _access_flags.is_abstract(); }
512 
513   // Returns true if the Klass to be generated will need to be addressable
514   // with a narrow Klass ID.
515   bool klass_needs_narrow_id() const;
516 
517   ClassLoaderData* loader_data() const { return _loader_data; }
518   const Symbol* class_name() const { return _class_name; }
519   const InstanceKlass* super_klass() const { return _super_klass; }
520 
521   ReferenceType super_reference_type() const;
522   bool is_instance_ref_klass() const;

 55  public:
 56   OopMapBlock* _nonstatic_oop_maps;
 57   unsigned int _nonstatic_oop_map_count;
 58   unsigned int _max_nonstatic_oop_maps;
 59 
 60   OopMapBlocksBuilder(unsigned int  max_blocks);
 61   OopMapBlock* last_oop_map() const;
 62   void initialize_inherited_blocks(OopMapBlock* blocks, unsigned int nof_blocks);
 63   void add(int offset, int count);
 64   void copy(OopMapBlock* dst);
 65   void compact();
 66   void print_on(outputStream* st) const;
 67   void print_value_on(outputStream* st) const;
 68 };
 69 
 70 // Values needed for oopmap and InstanceKlass creation
 71 class FieldLayoutInfo : public ResourceObj {
 72  public:
 73   OopMapBlocksBuilder* oop_map_blocks;
 74   int _instance_size;
 75   int _hash_offset;
 76   int _nonstatic_field_size;
 77   int _static_field_size;
 78   bool  _has_nonstatic_fields;
 79 };
 80 
 81 // Parser for for .class files
 82 //
 83 // The bytes describing the class file structure is read from a Stream object
 84 
 85 class ClassFileParser {
 86   friend class FieldLayoutBuilder;
 87   friend class FieldLayout;
 88 
 89   class ClassAnnotationCollector;
 90   class FieldAnnotationCollector;
 91 
 92  public:
 93   // The ClassFileParser has an associated "publicity" level
 94   // It is used to control which subsystems (if any)
 95   // will observe the parsing (logging, events, tracing).

484 
485  public:
486   ClassFileParser(ClassFileStream* stream,
487                   Symbol* name,
488                   ClassLoaderData* loader_data,
489                   const ClassLoadInfo* cl_info,
490                   Publicity pub_level,
491                   TRAPS);
492 
493   ~ClassFileParser();
494 
495   InstanceKlass* create_instance_klass(bool cf_changed_in_CFLH, const ClassInstanceInfo& cl_inst_info, TRAPS);
496 
497   const ClassFileStream* clone_stream() const;
498 
499   void set_klass_to_deallocate(InstanceKlass* klass);
500 
501   int static_field_size() const;
502   int total_oop_map_count() const;
503   jint layout_size() const;
504   int hash_offset() const;
505 
506   int vtable_size() const { return _vtable_size; }
507   int itable_size() const { return _itable_size; }
508 
509   u2 this_class_index() const { return _this_class_index; }
510 
511   bool is_hidden() const { return _is_hidden; }
512   bool is_interface() const { return _access_flags.is_interface(); }
513   bool is_abstract() const { return _access_flags.is_abstract(); }
514 
515   // Returns true if the Klass to be generated will need to be addressable
516   // with a narrow Klass ID.
517   bool klass_needs_narrow_id() const;
518 
519   ClassLoaderData* loader_data() const { return _loader_data; }
520   const Symbol* class_name() const { return _class_name; }
521   const InstanceKlass* super_klass() const { return _super_klass; }
522 
523   ReferenceType super_reference_type() const;
524   bool is_instance_ref_klass() const;
< prev index next >