< 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).

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

508 
509   int vtable_size() const { return _vtable_size; }
510   int itable_size() const { return _itable_size; }
511 
512   u2 this_class_index() const { return _this_class_index; }
513 
514   bool is_hidden() const { return _is_hidden; }
515   bool is_interface() const { return _access_flags.is_interface(); }
516   bool is_abstract() const { return _access_flags.is_abstract(); }
517 
518   // Returns true if the Klass to be generated will need to be addressable
519   // with a narrow Klass ID.
520   bool klass_needs_narrow_id() const;
521 
522   ClassLoaderData* loader_data() const { return _loader_data; }
523   const Symbol* class_name() const { return _class_name; }
524   const InstanceKlass* super_klass() const { return _super_klass; }
525 
526   ReferenceType super_reference_type() const;
527   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).

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