119 // above returns true. Otherwise, they should perform an appropriate |
119 // above returns true. Otherwise, they should perform an appropriate |
120 // barrier for an array whose elements are all in the given memory region. |
120 // barrier for an array whose elements are all in the given memory region. |
121 virtual void read_ref_array(MemRegion mr) = 0; |
121 virtual void read_ref_array(MemRegion mr) = 0; |
122 virtual void read_prim_array(MemRegion mr) = 0; |
122 virtual void read_prim_array(MemRegion mr) = 0; |
123 |
123 |
|
124 // Below length is the # array elements being written |
124 virtual void write_ref_array_pre( oop* dst, int length) {} |
125 virtual void write_ref_array_pre( oop* dst, int length) {} |
125 virtual void write_ref_array_pre(narrowOop* dst, int length) {} |
126 virtual void write_ref_array_pre(narrowOop* dst, int length) {} |
|
127 // Below MemRegion mr is expected to be HeapWord-aligned |
126 inline void write_ref_array(MemRegion mr); |
128 inline void write_ref_array(MemRegion mr); |
|
129 // Below count is the # array elements being written, starting |
|
130 // at the address "start", which may not necessarily be HeapWord-aligned |
|
131 inline void write_ref_array(HeapWord* start, size_t count); |
127 |
132 |
128 // Static versions, suitable for calling from generated code. |
133 // Static versions, suitable for calling from generated code; |
|
134 // count is # array elements being written, starting with "start", |
|
135 // which may not necessarily be HeapWord-aligned. |
129 static void static_write_ref_array_pre(HeapWord* start, size_t count); |
136 static void static_write_ref_array_pre(HeapWord* start, size_t count); |
130 static void static_write_ref_array_post(HeapWord* start, size_t count); |
137 static void static_write_ref_array_post(HeapWord* start, size_t count); |
131 // Narrow oop versions of the above; count is # of array elements being written, |
|
132 // starting with "start", which is HeapWord-aligned. |
|
133 static void static_write_ref_array_pre_narrow(HeapWord* start, size_t count); |
|
134 static void static_write_ref_array_post_narrow(HeapWord* start, size_t count); |
|
135 |
138 |
136 protected: |
139 protected: |
137 virtual void write_ref_array_work(MemRegion mr) = 0; |
140 virtual void write_ref_array_work(MemRegion mr) = 0; |
138 public: |
141 public: |
139 virtual void write_prim_array(MemRegion mr) = 0; |
142 virtual void write_prim_array(MemRegion mr) = 0; |