< prev index next >

src/hotspot/share/oops/oopsHierarchy.hpp

Print this page

 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_OOPS_OOPSHIERARCHY_HPP
 26 #define SHARE_OOPS_OOPSHIERARCHY_HPP
 27 
 28 #include "metaprogramming/integralConstant.hpp"
 29 #include "metaprogramming/primitiveConversions.hpp"
 30 #include "utilities/globalDefinitions.hpp"
 31 
 32 // OBJECT hierarchy
 33 // This hierarchy is a representation hierarchy, i.e. if A is a superclass
 34 // of B, A's representation is a prefix of B's representation.
 35 
 36 // Global offset instead of address for an oop within a java object.
 37 enum class narrowOop : uint32_t { null = 0 };
 38 
 39 // If compressed klass pointers then use narrowKlass.
 40 typedef juint  narrowKlass;
 41 
 42 typedef void* OopOrNarrowOopStar;
 43 
 44 #ifndef CHECK_UNHANDLED_OOPS
 45 
 46 typedef class oopDesc*                    oop;
 47 typedef class   instanceOopDesc*            instanceOop;
 48 typedef class   arrayOopDesc*               arrayOop;
 49 typedef class     objArrayOopDesc*            objArrayOop;
 50 typedef class     typeArrayOopDesc*           typeArrayOop;
 51 
 52 #else
 53 
 54 // When CHECK_UNHANDLED_OOPS is defined, an "oop" is a class with a
 55 // carefully chosen set of constructors and conversion operators to go
 56 // to and from the underlying oopDesc pointer type.
 57 //
 58 // Because oop and its subclasses <type>Oop are class types, arbitrary
 59 // conversions are not accepted by the compiler.  Applying a cast to
 60 // an oop will cause the best matched conversion operator to be
 61 // invoked returning the underlying oopDesc* type if appropriate.

 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_OOPS_OOPSHIERARCHY_HPP
 26 #define SHARE_OOPS_OOPSHIERARCHY_HPP
 27 
 28 #include "metaprogramming/integralConstant.hpp"
 29 #include "metaprogramming/primitiveConversions.hpp"
 30 #include "utilities/globalDefinitions.hpp"
 31 
 32 // OBJECT hierarchy
 33 // This hierarchy is a representation hierarchy, i.e. if A is a superclass
 34 // of B, A's representation is a prefix of B's representation.
 35 
 36 // Global offset instead of address for an oop within a java object.
 37 enum class narrowOop : uint32_t { null = 0 };
 38 



 39 typedef void* OopOrNarrowOopStar;
 40 
 41 #ifndef CHECK_UNHANDLED_OOPS
 42 
 43 typedef class oopDesc*                    oop;
 44 typedef class   instanceOopDesc*            instanceOop;
 45 typedef class   arrayOopDesc*               arrayOop;
 46 typedef class     objArrayOopDesc*            objArrayOop;
 47 typedef class     typeArrayOopDesc*           typeArrayOop;
 48 
 49 #else
 50 
 51 // When CHECK_UNHANDLED_OOPS is defined, an "oop" is a class with a
 52 // carefully chosen set of constructors and conversion operators to go
 53 // to and from the underlying oopDesc pointer type.
 54 //
 55 // Because oop and its subclasses <type>Oop are class types, arbitrary
 56 // conversions are not accepted by the compiler.  Applying a cast to
 57 // an oop will cause the best matched conversion operator to be
 58 // invoked returning the underlying oopDesc* type if appropriate.
< prev index next >