< prev index next >

src/hotspot/share/oops/accessBackend.hpp

Print this page




 393 
 394   template <typename T>
 395   static T atomic_cmpxchg_at(T new_value, oop base, ptrdiff_t offset, T compare_value) {
 396     return atomic_cmpxchg(new_value, field_addr(base, offset), compare_value);
 397   }
 398 
 399   template <typename T>
 400   static T atomic_xchg_at(T new_value, oop base, ptrdiff_t offset) {
 401     return atomic_xchg(new_value, field_addr(base, offset));
 402   }
 403 
 404   template <typename T>
 405   static bool oop_arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
 406                             arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
 407                             size_t length);
 408 
 409   static void clone(oop src, oop dst, size_t size);
 410 
 411   static oop resolve(oop obj) { return obj; }
 412 
 413   static bool equals(oop o1, oop o2) { return o1 == o2; }
 414 };
 415 
 416 // Below is the implementation of the first 4 steps of the template pipeline:
 417 // * Step 1: Set default decorators and decay types. This step gets rid of CV qualifiers
 418 //           and sets default decorators to sensible values.
 419 // * Step 2: Reduce types. This step makes sure there is only a single T type and not
 420 //           multiple types. The P type of the address and T type of the value must
 421 //           match.
 422 // * Step 3: Pre-runtime dispatch. This step checks whether a runtime call can be
 423 //           avoided, and in that case avoids it (calling raw accesses or
 424 //           primitive accesses in a build that does not require primitive GC barriers)
 425 // * Step 4: Runtime-dispatch. This step performs a runtime dispatch to the corresponding
 426 //           BarrierSet::AccessBarrier accessor that attaches GC-required barriers
 427 //           to the access.
 428 
 429 namespace AccessInternal {
 430   template <typename T>
 431   struct OopOrNarrowOopInternal: AllStatic {
 432     typedef oop type;
 433   };




 393 
 394   template <typename T>
 395   static T atomic_cmpxchg_at(T new_value, oop base, ptrdiff_t offset, T compare_value) {
 396     return atomic_cmpxchg(new_value, field_addr(base, offset), compare_value);
 397   }
 398 
 399   template <typename T>
 400   static T atomic_xchg_at(T new_value, oop base, ptrdiff_t offset) {
 401     return atomic_xchg(new_value, field_addr(base, offset));
 402   }
 403 
 404   template <typename T>
 405   static bool oop_arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
 406                             arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
 407                             size_t length);
 408 
 409   static void clone(oop src, oop dst, size_t size);
 410 
 411   static oop resolve(oop obj) { return obj; }
 412 
 413   static bool equals(oop o1, oop o2) { return (void*) o1 == (void*) o2; }
 414 };
 415 
 416 // Below is the implementation of the first 4 steps of the template pipeline:
 417 // * Step 1: Set default decorators and decay types. This step gets rid of CV qualifiers
 418 //           and sets default decorators to sensible values.
 419 // * Step 2: Reduce types. This step makes sure there is only a single T type and not
 420 //           multiple types. The P type of the address and T type of the value must
 421 //           match.
 422 // * Step 3: Pre-runtime dispatch. This step checks whether a runtime call can be
 423 //           avoided, and in that case avoids it (calling raw accesses or
 424 //           primitive accesses in a build that does not require primitive GC barriers)
 425 // * Step 4: Runtime-dispatch. This step performs a runtime dispatch to the corresponding
 426 //           BarrierSet::AccessBarrier accessor that attaches GC-required barriers
 427 //           to the access.
 428 
 429 namespace AccessInternal {
 430   template <typename T>
 431   struct OopOrNarrowOopInternal: AllStatic {
 432     typedef oop type;
 433   };


< prev index next >