< prev index next >

src/hotspot/share/oops/accessBackend.hpp

Print this page
rev 52073 : 8212054: Boilerplate to bind oopDesc::equals_raw() to actual raw implementation


 981       RuntimeDispatch<decorators, oop, BARRIER_CLONE>::clone(src, dst, size);
 982     }
 983 
 984     template <DecoratorSet decorators>
 985     inline static typename EnableIf<
 986       HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, oop>::type
 987     resolve(oop obj) {
 988       typedef RawAccessBarrier<decorators & RAW_DECORATOR_MASK> Raw;
 989       return Raw::resolve(obj);
 990     }
 991 
 992     template <DecoratorSet decorators>
 993     inline static typename EnableIf<
 994       !HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, oop>::type
 995     resolve(oop obj) {
 996       return RuntimeDispatch<decorators, oop, BARRIER_RESOLVE>::resolve(obj);
 997     }
 998 
 999     template <DecoratorSet decorators>
1000     inline static typename EnableIf<
1001       HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, bool>::type
1002     equals(oop o1, oop o2) {
1003       typedef RawAccessBarrier<decorators & RAW_DECORATOR_MASK> Raw;
1004       return Raw::equals(o1, o2);
1005     }
1006 
1007     template <DecoratorSet decorators>
1008     inline static typename EnableIf<
1009       !HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, bool>::type
1010     equals(oop o1, oop o2) {
1011       return RuntimeDispatch<decorators, oop, BARRIER_EQUALS>::equals(o1, o2);
1012     }
1013   };
1014 
1015   // Step 2: Reduce types.
1016   // Enforce that for non-oop types, T and P have to be strictly the same.
1017   // P is the type of the address and T is the type of the values.
1018   // As for oop types, it is allow to send T in {narrowOop, oop} and
1019   // P in {narrowOop, oop, HeapWord*}. The following rules apply according to
1020   // the subsequent table. (columns are P, rows are T)
1021   // |           | HeapWord  |   oop   | narrowOop |
1022   // |   oop     |  rt-comp  | hw-none |  hw-comp  |
1023   // | narrowOop |     x     |    x    |  hw-none  |
1024   //
1025   // x means not allowed
1026   // rt-comp means it must be checked at runtime whether the oop is compressed.
1027   // hw-none means it is statically known the oop will not be compressed.
1028   // hw-comp means it is statically known the oop will be compressed.
1029 




 981       RuntimeDispatch<decorators, oop, BARRIER_CLONE>::clone(src, dst, size);
 982     }
 983 
 984     template <DecoratorSet decorators>
 985     inline static typename EnableIf<
 986       HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, oop>::type
 987     resolve(oop obj) {
 988       typedef RawAccessBarrier<decorators & RAW_DECORATOR_MASK> Raw;
 989       return Raw::resolve(obj);
 990     }
 991 
 992     template <DecoratorSet decorators>
 993     inline static typename EnableIf<
 994       !HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, oop>::type
 995     resolve(oop obj) {
 996       return RuntimeDispatch<decorators, oop, BARRIER_RESOLVE>::resolve(obj);
 997     }
 998 
 999     template <DecoratorSet decorators>
1000     inline static typename EnableIf<
1001       HasDecorator<decorators, AS_RAW>::value || HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, bool>::type
1002     equals(oop o1, oop o2) {
1003       typedef RawAccessBarrier<decorators & RAW_DECORATOR_MASK> Raw;
1004       return Raw::equals(o1, o2);
1005     }
1006 
1007     template <DecoratorSet decorators>
1008     inline static typename EnableIf<
1009       !HasDecorator<decorators, AS_RAW>::value && !HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, bool>::type
1010     equals(oop o1, oop o2) {
1011       return RuntimeDispatch<decorators, oop, BARRIER_EQUALS>::equals(o1, o2);
1012     }
1013   };
1014 
1015   // Step 2: Reduce types.
1016   // Enforce that for non-oop types, T and P have to be strictly the same.
1017   // P is the type of the address and T is the type of the values.
1018   // As for oop types, it is allow to send T in {narrowOop, oop} and
1019   // P in {narrowOop, oop, HeapWord*}. The following rules apply according to
1020   // the subsequent table. (columns are P, rows are T)
1021   // |           | HeapWord  |   oop   | narrowOop |
1022   // |   oop     |  rt-comp  | hw-none |  hw-comp  |
1023   // | narrowOop |     x     |    x    |  hw-none  |
1024   //
1025   // x means not allowed
1026   // rt-comp means it must be checked at runtime whether the oop is compressed.
1027   // hw-none means it is statically known the oop will not be compressed.
1028   // hw-comp means it is statically known the oop will be compressed.
1029 


< prev index next >