197 return layout_helper_to_size_helper(layout_helper());
198 }
199
200 // Metadata iterators
201 void array_klasses_do(void f(Klass* k));
202
203 // allocate_instance() allocates a stand alone value in the Java heap
204 // initialized to default value (cleared memory)
205 instanceOop allocate_instance(TRAPS);
206 // allocates a stand alone value buffer in the Java heap
207 // DOES NOT have memory cleared, user MUST initialize payload before
208 // returning to Java (i.e.: value_copy)
209 instanceOop allocate_instance_buffer(TRAPS);
210
211 // minimum number of bytes occupied by nonstatic fields, HeapWord aligned or pow2
212 int raw_value_byte_size();
213
214 address data_for_oop(oop o) const;
215 oop oop_for_data(address data) const;
216
217 // Query if h/w provides atomic load/store
218 bool is_atomic();
219
220 bool flatten_array();
221
222 bool contains_oops() const { return nonstatic_oop_map_count() > 0; }
223 int nonstatic_oop_count();
224
225 // General store methods
226 //
227 // Normally loads and store methods would be found in *Oops classes, but since values can be
228 // "in-lined" (flattened) into containing oops, these methods reside here in ValueKlass.
229 //
230 // "value_copy_*_to_new_*" assume new memory (i.e. IS_DEST_UNINITIALIZED for write barriers)
231
232 void value_copy_payload_to_new_oop(void* src, oop dst);
233 void value_copy_oop_to_new_oop(oop src, oop dst);
234 void value_copy_oop_to_new_payload(oop src, void* dst);
235 void value_copy_oop_to_payload(oop src, void* dst);
236
237 oop read_flattened_field(oop obj, int offset, TRAPS);
238 void write_flattened_field(oop obj, int offset, oop value, TRAPS);
|
197 return layout_helper_to_size_helper(layout_helper());
198 }
199
200 // Metadata iterators
201 void array_klasses_do(void f(Klass* k));
202
203 // allocate_instance() allocates a stand alone value in the Java heap
204 // initialized to default value (cleared memory)
205 instanceOop allocate_instance(TRAPS);
206 // allocates a stand alone value buffer in the Java heap
207 // DOES NOT have memory cleared, user MUST initialize payload before
208 // returning to Java (i.e.: value_copy)
209 instanceOop allocate_instance_buffer(TRAPS);
210
211 // minimum number of bytes occupied by nonstatic fields, HeapWord aligned or pow2
212 int raw_value_byte_size();
213
214 address data_for_oop(oop o) const;
215 oop oop_for_data(address data) const;
216
217 // Query if this class promises atomicity one way or another
218 bool is_atomic() { return is_naturally_atomic() || is_declared_atomic(); }
219
220 bool flatten_array();
221
222 bool contains_oops() const { return nonstatic_oop_map_count() > 0; }
223 int nonstatic_oop_count();
224
225 // General store methods
226 //
227 // Normally loads and store methods would be found in *Oops classes, but since values can be
228 // "in-lined" (flattened) into containing oops, these methods reside here in ValueKlass.
229 //
230 // "value_copy_*_to_new_*" assume new memory (i.e. IS_DEST_UNINITIALIZED for write barriers)
231
232 void value_copy_payload_to_new_oop(void* src, oop dst);
233 void value_copy_oop_to_new_oop(oop src, oop dst);
234 void value_copy_oop_to_new_payload(oop src, void* dst);
235 void value_copy_oop_to_payload(oop src, void* dst);
236
237 oop read_flattened_field(oop obj, int offset, TRAPS);
238 void write_flattened_field(oop obj, int offset, oop value, TRAPS);
|