src/hotspot/share/oops/accessDecorators.hpp
changeset 50532 a18c60527166
parent 49906 4bb58f644e4e
child 50599 ecc2af326b5f
equal deleted inserted replaced
50531:aeb7fb702890 50532:a18c60527166
   190 //   implies that it is also an IN_ROOT.
   190 //   implies that it is also an IN_ROOT.
   191 const DecoratorSet IN_HEAP            = UCONST64(1) << 20;
   191 const DecoratorSet IN_HEAP            = UCONST64(1) << 20;
   192 const DecoratorSet IN_HEAP_ARRAY      = UCONST64(1) << 21;
   192 const DecoratorSet IN_HEAP_ARRAY      = UCONST64(1) << 21;
   193 const DecoratorSet IN_ROOT            = UCONST64(1) << 22;
   193 const DecoratorSet IN_ROOT            = UCONST64(1) << 22;
   194 const DecoratorSet IN_CONCURRENT_ROOT = UCONST64(1) << 23;
   194 const DecoratorSet IN_CONCURRENT_ROOT = UCONST64(1) << 23;
   195 const DecoratorSet IN_ARCHIVE_ROOT    = UCONST64(1) << 24;
       
   196 const DecoratorSet IN_DECORATOR_MASK  = IN_HEAP | IN_HEAP_ARRAY |
   195 const DecoratorSet IN_DECORATOR_MASK  = IN_HEAP | IN_HEAP_ARRAY |
   197                                         IN_ROOT | IN_CONCURRENT_ROOT |
   196                                         IN_ROOT | IN_CONCURRENT_ROOT;
   198                                         IN_ARCHIVE_ROOT;
       
   199 
   197 
   200 // == Value Decorators ==
   198 // == Value Decorators ==
   201 // * OOP_NOT_NULL: This property can make certain barriers faster such as compressing oops.
   199 // * OOP_NOT_NULL: This property can make certain barriers faster such as compressing oops.
   202 const DecoratorSet OOP_NOT_NULL       = UCONST64(1) << 25;
   200 const DecoratorSet OOP_NOT_NULL       = UCONST64(1) << 25;
   203 const DecoratorSet OOP_DECORATOR_MASK = OOP_NOT_NULL;
   201 const DecoratorSet OOP_DECORATOR_MASK = OOP_NOT_NULL;
   243     // Heap array accesses imply it is a heap access
   241     // Heap array accesses imply it is a heap access
   244     static const DecoratorSet heap_array_is_in_heap = barrier_strength_default |
   242     static const DecoratorSet heap_array_is_in_heap = barrier_strength_default |
   245       ((IN_HEAP_ARRAY & barrier_strength_default) != 0 ? IN_HEAP : INTERNAL_EMPTY);
   243       ((IN_HEAP_ARRAY & barrier_strength_default) != 0 ? IN_HEAP : INTERNAL_EMPTY);
   246     static const DecoratorSet conc_root_is_root = heap_array_is_in_heap |
   244     static const DecoratorSet conc_root_is_root = heap_array_is_in_heap |
   247       ((IN_CONCURRENT_ROOT & heap_array_is_in_heap) != 0 ? IN_ROOT : INTERNAL_EMPTY);
   245       ((IN_CONCURRENT_ROOT & heap_array_is_in_heap) != 0 ? IN_ROOT : INTERNAL_EMPTY);
   248     static const DecoratorSet archive_root_is_root = conc_root_is_root |
   246     static const DecoratorSet value = conc_root_is_root | BT_BUILDTIME_DECORATORS;
   249       ((IN_ARCHIVE_ROOT & conc_root_is_root) != 0 ? IN_ROOT : INTERNAL_EMPTY);
       
   250     static const DecoratorSet value = archive_root_is_root | BT_BUILDTIME_DECORATORS;
       
   251   };
   247   };
   252 
   248 
   253   // This function implements the above DecoratorFixup rules, but without meta
   249   // This function implements the above DecoratorFixup rules, but without meta
   254   // programming for code generation that does not use templates.
   250   // programming for code generation that does not use templates.
   255   inline DecoratorSet decorator_fixup(DecoratorSet input_decorators) {
   251   inline DecoratorSet decorator_fixup(DecoratorSet input_decorators) {
   266     // Heap array accesses imply it is a heap access
   262     // Heap array accesses imply it is a heap access
   267     DecoratorSet heap_array_is_in_heap = barrier_strength_default |
   263     DecoratorSet heap_array_is_in_heap = barrier_strength_default |
   268       ((IN_HEAP_ARRAY & barrier_strength_default) != 0 ? IN_HEAP : INTERNAL_EMPTY);
   264       ((IN_HEAP_ARRAY & barrier_strength_default) != 0 ? IN_HEAP : INTERNAL_EMPTY);
   269     DecoratorSet conc_root_is_root = heap_array_is_in_heap |
   265     DecoratorSet conc_root_is_root = heap_array_is_in_heap |
   270       ((IN_CONCURRENT_ROOT & heap_array_is_in_heap) != 0 ? IN_ROOT : INTERNAL_EMPTY);
   266       ((IN_CONCURRENT_ROOT & heap_array_is_in_heap) != 0 ? IN_ROOT : INTERNAL_EMPTY);
   271     DecoratorSet archive_root_is_root = conc_root_is_root |
   267     DecoratorSet value = conc_root_is_root | BT_BUILDTIME_DECORATORS;
   272       ((IN_ARCHIVE_ROOT & conc_root_is_root) != 0 ? IN_ROOT : INTERNAL_EMPTY);
       
   273     DecoratorSet value = archive_root_is_root | BT_BUILDTIME_DECORATORS;
       
   274     return value;
   268     return value;
   275   }
   269   }
   276 }
   270 }
   277 
   271 
   278 #endif // SHARE_OOPS_ACCESSDECORATORS_HPP
   272 #endif // SHARE_OOPS_ACCESSDECORATORS_HPP