src/share/vm/oops/oopsHierarchy.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File bug_8003424.4 Sdiff src/share/vm/oops

src/share/vm/oops/oopsHierarchy.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  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_VM_OOPS_OOPSHIERARCHY_HPP
  26 #define SHARE_VM_OOPS_OOPSHIERARCHY_HPP
  27 
  28 #include "runtime/globals.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 
  31 // OBJECT hierarchy
  32 // This hierarchy is a representation hierarchy, i.e. if A is a superclass
  33 // of B, A's representation is a prefix of B's representation.
  34 
  35 typedef juint narrowOop; // Offset instead of address for an oop within a java object




  36 typedef void* OopOrNarrowOopStar;
  37 typedef class   markOopDesc*                markOop;
  38 
  39 #ifndef CHECK_UNHANDLED_OOPS
  40 
  41 typedef class oopDesc*                            oop;
  42 typedef class   instanceOopDesc*            instanceOop;
  43 typedef class   arrayOopDesc*                    arrayOop;
  44 typedef class     objArrayOopDesc*            objArrayOop;
  45 typedef class     typeArrayOopDesc*            typeArrayOop;
  46 
  47 #else
  48 
  49 // When CHECK_UNHANDLED_OOPS is defined, an "oop" is a class with a
  50 // carefully chosen set of constructors and conversion operators to go
  51 // to and from the underlying oopDesc pointer type.
  52 //
  53 // Because oop and its subclasses <type>Oop are class types, arbitrary
  54 // conversions are not accepted by the compiler, and you may get a message
  55 // about overloading ambiguity (between long and int is common when converting


   1 /*
   2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  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_VM_OOPS_OOPSHIERARCHY_HPP
  26 #define SHARE_VM_OOPS_OOPSHIERARCHY_HPP
  27 
  28 #include "runtime/globals.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 
  31 // OBJECT hierarchy
  32 // This hierarchy is a representation hierarchy, i.e. if A is a superclass
  33 // of B, A's representation is a prefix of B's representation.
  34 
  35 typedef juint narrowOop; // Offset instead of address for an oop within a java object
  36 
  37 // If compressed klass pointers then use narrowKlass.
  38 typedef juint  narrowKlass;
  39 
  40 typedef void* OopOrNarrowOopStar;
  41 typedef class   markOopDesc*                markOop;
  42 
  43 #ifndef CHECK_UNHANDLED_OOPS
  44 
  45 typedef class oopDesc*                            oop;
  46 typedef class   instanceOopDesc*            instanceOop;
  47 typedef class   arrayOopDesc*                    arrayOop;
  48 typedef class     objArrayOopDesc*            objArrayOop;
  49 typedef class     typeArrayOopDesc*            typeArrayOop;
  50 
  51 #else
  52 
  53 // When CHECK_UNHANDLED_OOPS is defined, an "oop" is a class with a
  54 // carefully chosen set of constructors and conversion operators to go
  55 // to and from the underlying oopDesc pointer type.
  56 //
  57 // Because oop and its subclasses <type>Oop are class types, arbitrary
  58 // conversions are not accepted by the compiler, and you may get a message
  59 // about overloading ambiguity (between long and int is common when converting


src/share/vm/oops/oopsHierarchy.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File