hotspot/src/share/vm/memory/cardTableModRefBS.hpp
changeset 3262 30d1c247fc25
parent 2154 72a9b7284ccf
child 3695 421cfcc8843c
--- a/hotspot/src/share/vm/memory/cardTableModRefBS.hpp	Fri Jul 10 16:01:20 2009 -0700
+++ b/hotspot/src/share/vm/memory/cardTableModRefBS.hpp	Tue Jul 14 15:40:39 2009 -0700
@@ -287,7 +287,7 @@
   // these functions here for performance.
 protected:
   void write_ref_field_work(oop obj, size_t offset, oop newVal);
-  void write_ref_field_work(void* field, oop newVal);
+  virtual void write_ref_field_work(void* field, oop newVal);
 public:
 
   bool has_write_ref_array_opt() { return true; }
@@ -317,10 +317,10 @@
 
   // *** Card-table-barrier-specific things.
 
-  inline void inline_write_ref_field_pre(void* field, oop newVal) {}
+  template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {}
 
-  inline void inline_write_ref_field(void* field, oop newVal) {
-    jbyte* byte = byte_for(field);
+  template <class T> inline void inline_write_ref_field(T* field, oop newVal) {
+    jbyte* byte = byte_for((void*)field);
     *byte = dirty_card;
   }