< prev index next >

src/hotspot/share/classfile/fieldLayoutBuilder.hpp

Print this page

168 
169  public:
170   FieldLayout(GrowableArray<FieldInfo>* field_info, ConstantPool* cp);
171   void initialize_static_layout();
172   void initialize_instance_layout(const InstanceKlass* ik);
173 
174   LayoutRawBlock* first_empty_block() {
175     LayoutRawBlock* block = _start;
176     while (block->kind() != LayoutRawBlock::EMPTY) {
177       block = block->next_block();
178     }
179     return block;
180   }
181 
182   LayoutRawBlock* start() { return _start; }
183   void set_start(LayoutRawBlock* start) { _start = start; }
184   LayoutRawBlock* last_block() { return _last; }
185 
186   LayoutRawBlock* first_field_block();
187   void add(GrowableArray<LayoutRawBlock*>* list, LayoutRawBlock* start = nullptr);

188   void add_field_at_offset(LayoutRawBlock* blocks, int offset, LayoutRawBlock* start = nullptr);
189   void add_contiguously(GrowableArray<LayoutRawBlock*>* list, LayoutRawBlock* start = nullptr);
190   LayoutRawBlock* insert_field_block(LayoutRawBlock* slot, LayoutRawBlock* block);
191   bool reconstruct_layout(const InstanceKlass* ik);
192   void fill_holes(const InstanceKlass* ik);
193   LayoutRawBlock* insert(LayoutRawBlock* slot, LayoutRawBlock* block);
194   void remove(LayoutRawBlock* block);
195   void print(outputStream* output, bool is_static, const InstanceKlass* super);
196 };
197 
198 
199 // FieldLayoutBuilder is the main entry point for layout computation.
200 // This class has three methods to generate layout: one for regular classes
201 // and two for classes with hard coded offsets (java,lang.ref.Reference
202 // and the boxing classes). The rationale for having multiple methods
203 // is that each kind of class has a different set goals regarding
204 // its layout, so instead of mixing several layout strategies into a
205 // single method, each kind has its own method (see comments below
206 // for more details about the allocation strategies).
207 //

168 
169  public:
170   FieldLayout(GrowableArray<FieldInfo>* field_info, ConstantPool* cp);
171   void initialize_static_layout();
172   void initialize_instance_layout(const InstanceKlass* ik);
173 
174   LayoutRawBlock* first_empty_block() {
175     LayoutRawBlock* block = _start;
176     while (block->kind() != LayoutRawBlock::EMPTY) {
177       block = block->next_block();
178     }
179     return block;
180   }
181 
182   LayoutRawBlock* start() { return _start; }
183   void set_start(LayoutRawBlock* start) { _start = start; }
184   LayoutRawBlock* last_block() { return _last; }
185 
186   LayoutRawBlock* first_field_block();
187   void add(GrowableArray<LayoutRawBlock*>* list, LayoutRawBlock* start = nullptr);
188   int find_hash_offset();
189   void add_field_at_offset(LayoutRawBlock* blocks, int offset, LayoutRawBlock* start = nullptr);
190   void add_contiguously(GrowableArray<LayoutRawBlock*>* list, LayoutRawBlock* start = nullptr);
191   LayoutRawBlock* insert_field_block(LayoutRawBlock* slot, LayoutRawBlock* block);
192   bool reconstruct_layout(const InstanceKlass* ik);
193   void fill_holes(const InstanceKlass* ik);
194   LayoutRawBlock* insert(LayoutRawBlock* slot, LayoutRawBlock* block);
195   void remove(LayoutRawBlock* block);
196   void print(outputStream* output, bool is_static, const InstanceKlass* super);
197 };
198 
199 
200 // FieldLayoutBuilder is the main entry point for layout computation.
201 // This class has three methods to generate layout: one for regular classes
202 // and two for classes with hard coded offsets (java,lang.ref.Reference
203 // and the boxing classes). The rationale for having multiple methods
204 // is that each kind of class has a different set goals regarding
205 // its layout, so instead of mixing several layout strategies into a
206 // single method, each kind has its own method (see comments below
207 // for more details about the allocation strategies).
208 //
< prev index next >