< prev index next > src/hotspot/share/oops/access.inline.hpp
Print this page
};
template <class GCBarrierType, DecoratorSet decorators>
struct PostRuntimeDispatch<GCBarrierType, BARRIER_ARRAYCOPY, decorators>: public AllStatic {
template <typename T>
- static bool access_barrier(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
+ static void access_barrier(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
size_t length) {
GCBarrierType::arraycopy_in_heap(src_obj, src_offset_in_bytes, src_raw,
dst_obj, dst_offset_in_bytes, dst_raw,
length);
- return true;
}
template <typename T>
- static bool oop_access_barrier(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
+ static void oop_access_barrier(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
size_t length) {
typedef typename HeapOopType<decorators>::type OopType;
- return GCBarrierType::oop_arraycopy_in_heap(src_obj, src_offset_in_bytes, reinterpret_cast<OopType*>(src_raw),
- dst_obj, dst_offset_in_bytes, reinterpret_cast<OopType*>(dst_raw),
- length);
+ GCBarrierType::oop_arraycopy_in_heap(src_obj, src_offset_in_bytes, reinterpret_cast<OopType*>(src_raw),
+ dst_obj, dst_offset_in_bytes, reinterpret_cast<OopType*>(dst_raw),
+ length);
}
};
template <class GCBarrierType, DecoratorSet decorators>
struct PostRuntimeDispatch<GCBarrierType, BARRIER_STORE_AT, decorators>: public AllStatic {
static void access_barrier(oop src, oop dst, size_t size) {
GCBarrierType::clone_in_heap(src, dst, size);
}
};
+ template <class GCBarrierType, DecoratorSet decorators>
+ struct PostRuntimeDispatch<GCBarrierType, BARRIER_VALUE_COPY, decorators>: public AllStatic {
+ static void access_barrier(void* src, void* dst, InlineKlass* md, LayoutKind lk) {
+ GCBarrierType::value_copy_in_heap(src, dst, md, lk);
+ }
+ };
+
// Resolving accessors with barriers from the barrier set happens in two steps.
// 1. Expand paths with runtime-decorators, e.g. is UseCompressedOops on or off.
// 2. Expand paths for each BarrierSet available in the system.
template <DecoratorSet decorators, typename FunctionPointerT, BarrierType barrier_type>
struct BarrierResolver: public AllStatic {
_atomic_xchg_at_func = function;
return function(base, offset, new_value);
}
template <DecoratorSet decorators, typename T>
- bool RuntimeDispatch<decorators, T, BARRIER_ARRAYCOPY>::arraycopy_init(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
+ void RuntimeDispatch<decorators, T, BARRIER_ARRAYCOPY>::arraycopy_init(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
size_t length) {
func_t function = BarrierResolver<decorators, func_t, BARRIER_ARRAYCOPY>::resolve_barrier();
_arraycopy_func = function;
- return function(src_obj, src_offset_in_bytes, src_raw,
- dst_obj, dst_offset_in_bytes, dst_raw,
- length);
+ function(src_obj, src_offset_in_bytes, src_raw,
+ dst_obj, dst_offset_in_bytes, dst_raw,
+ length);
}
template <DecoratorSet decorators, typename T>
void RuntimeDispatch<decorators, T, BARRIER_CLONE>::clone_init(oop src, oop dst, size_t size) {
func_t function = BarrierResolver<decorators, func_t, BARRIER_CLONE>::resolve_barrier();
_clone_func = function;
function(src, dst, size);
}
+
+ template <DecoratorSet decorators, typename T>
+ void RuntimeDispatch<decorators, T, BARRIER_VALUE_COPY>::value_copy_init(void* src, void* dst, InlineKlass* md, LayoutKind lk) {
+ func_t function = BarrierResolver<decorators, func_t, BARRIER_VALUE_COPY>::resolve_barrier();
+ _value_copy_func = function;
+ function(src, dst, md,lk);
+ }
}
#endif // SHARE_OOPS_ACCESS_INLINE_HPP
< prev index next >