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