src/share/vm/memory/cardTableModRefBS.hpp

changeset 1280
df6caf649ff7
parent 1063
7bb995fbd3c0
child 1375
8624da129f0b
equal deleted inserted replaced
1274:bb18957ad21e 1280:df6caf649ff7
285 // The scanning code has to handle the fact that the write barrier may be 285 // The scanning code has to handle the fact that the write barrier may be
286 // either precise or imprecise. We make non-virtual inline variants of 286 // either precise or imprecise. We make non-virtual inline variants of
287 // these functions here for performance. 287 // these functions here for performance.
288 protected: 288 protected:
289 void write_ref_field_work(oop obj, size_t offset, oop newVal); 289 void write_ref_field_work(oop obj, size_t offset, oop newVal);
290 void write_ref_field_work(void* field, oop newVal); 290 virtual void write_ref_field_work(void* field, oop newVal);
291 public: 291 public:
292 292
293 bool has_write_ref_array_opt() { return true; } 293 bool has_write_ref_array_opt() { return true; }
294 bool has_write_region_opt() { return true; } 294 bool has_write_region_opt() { return true; }
295 295
315 return is_card_aligned(addr); 315 return is_card_aligned(addr);
316 } 316 }
317 317
318 // *** Card-table-barrier-specific things. 318 // *** Card-table-barrier-specific things.
319 319
320 inline void inline_write_ref_field_pre(void* field, oop newVal) {} 320 template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {}
321 321
322 inline void inline_write_ref_field(void* field, oop newVal) { 322 template <class T> inline void inline_write_ref_field(T* field, oop newVal) {
323 jbyte* byte = byte_for(field); 323 jbyte* byte = byte_for((void*)field);
324 *byte = dirty_card; 324 *byte = dirty_card;
325 } 325 }
326 326
327 // These are used by G1, when it uses the card table as a temporary data 327 // These are used by G1, when it uses the card table as a temporary data
328 // structure for card claiming. 328 // structure for card claiming.

mercurial