src/hotspot/share/oops/access.inline.hpp
changeset 58176 470af058bd5f
parent 53207 b1c6d4d7f801
child 59251 4cbfa5077d68
equal deleted inserted replaced
58175:272910ccd7bb 58176:470af058bd5f
   201 
   201 
   202   template <class GCBarrierType, DecoratorSet decorators>
   202   template <class GCBarrierType, DecoratorSet decorators>
   203   struct PostRuntimeDispatch<GCBarrierType, BARRIER_RESOLVE, decorators>: public AllStatic {
   203   struct PostRuntimeDispatch<GCBarrierType, BARRIER_RESOLVE, decorators>: public AllStatic {
   204     static oop access_barrier(oop obj) {
   204     static oop access_barrier(oop obj) {
   205       return GCBarrierType::resolve(obj);
   205       return GCBarrierType::resolve(obj);
   206     }
       
   207   };
       
   208 
       
   209   template <class GCBarrierType, DecoratorSet decorators>
       
   210   struct PostRuntimeDispatch<GCBarrierType, BARRIER_EQUALS, decorators>: public AllStatic {
       
   211     static bool access_barrier(oop o1, oop o2) {
       
   212       return GCBarrierType::equals(o1, o2);
       
   213     }
   206     }
   214   };
   207   };
   215 
   208 
   216   // Resolving accessors with barriers from the barrier set happens in two steps.
   209   // Resolving accessors with barriers from the barrier set happens in two steps.
   217   // 1. Expand paths with runtime-decorators, e.g. is UseCompressedOops on or off.
   210   // 1. Expand paths with runtime-decorators, e.g. is UseCompressedOops on or off.
   365   oop RuntimeDispatch<decorators, T, BARRIER_RESOLVE>::resolve_init(oop obj) {
   358   oop RuntimeDispatch<decorators, T, BARRIER_RESOLVE>::resolve_init(oop obj) {
   366     func_t function = BarrierResolver<decorators, func_t, BARRIER_RESOLVE>::resolve_barrier();
   359     func_t function = BarrierResolver<decorators, func_t, BARRIER_RESOLVE>::resolve_barrier();
   367     _resolve_func = function;
   360     _resolve_func = function;
   368     return function(obj);
   361     return function(obj);
   369   }
   362   }
   370 
       
   371   template <DecoratorSet decorators, typename T>
       
   372   bool RuntimeDispatch<decorators, T, BARRIER_EQUALS>::equals_init(oop o1, oop o2) {
       
   373     func_t function = BarrierResolver<decorators, func_t, BARRIER_EQUALS>::resolve_barrier();
       
   374     _equals_func = function;
       
   375     return function(o1, o2);
       
   376   }
       
   377 }
   363 }
   378 
   364 
   379 #endif // SHARE_OOPS_ACCESS_INLINE_HPP
   365 #endif // SHARE_OOPS_ACCESS_INLINE_HPP