src/hotspot/share/gc/shared/modRefBarrierSet.inline.hpp
changeset 49592 77fb0be7d19f
parent 49484 ee8fa73b90f9
child 50389 7e8c0409a747
equal deleted inserted replaced
49591:272dff61a2de 49592:77fb0be7d19f
    25 #ifndef SHARE_VM_GC_SHARED_MODREFBARRIERSET_INLINE_HPP
    25 #ifndef SHARE_VM_GC_SHARED_MODREFBARRIERSET_INLINE_HPP
    26 #define SHARE_VM_GC_SHARED_MODREFBARRIERSET_INLINE_HPP
    26 #define SHARE_VM_GC_SHARED_MODREFBARRIERSET_INLINE_HPP
    27 
    27 
    28 #include "gc/shared/barrierSet.hpp"
    28 #include "gc/shared/barrierSet.hpp"
    29 #include "gc/shared/modRefBarrierSet.hpp"
    29 #include "gc/shared/modRefBarrierSet.hpp"
       
    30 #include "oops/compressedOops.inline.hpp"
    30 #include "oops/klass.inline.hpp"
    31 #include "oops/klass.inline.hpp"
    31 #include "oops/objArrayOop.hpp"
    32 #include "oops/objArrayOop.hpp"
    32 #include "oops/oop.hpp"
    33 #include "oops/oop.hpp"
    33 
    34 
    34 // count is number of array elements being written
    35 // count is number of array elements being written
   103     Klass* bound = objArrayOop(dst_obj)->element_klass();
   104     Klass* bound = objArrayOop(dst_obj)->element_klass();
   104     T* from = src;
   105     T* from = src;
   105     T* end = from + length;
   106     T* end = from + length;
   106     for (T* p = dst; from < end; from++, p++) {
   107     for (T* p = dst; from < end; from++, p++) {
   107       T element = *from;
   108       T element = *from;
   108       if (bound->is_instanceof_or_null(element)) {
   109       if (oopDesc::is_instanceof_or_null(CompressedOops::decode(element), bound)) {
   109         bs->template write_ref_field_pre<decorators>(p);
   110         bs->template write_ref_field_pre<decorators>(p);
   110         *p = element;
   111         *p = element;
   111       } else {
   112       } else {
   112         // We must do a barrier to cover the partial copy.
   113         // We must do a barrier to cover the partial copy.
   113         const size_t pd = pointer_delta(p, dst, (size_t)heapOopSize);
   114         const size_t pd = pointer_delta(p, dst, (size_t)heapOopSize);