src/share/vm/ci/ciInstanceKlass.cpp

Print this page




   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 #include "incls/_precompiled.incl"
  26 #include "incls/_ciInstanceKlass.cpp.incl"








  27 
  28 // ciInstanceKlass
  29 //
  30 // This class represents a klassOop in the HotSpot virtual machine
  31 // whose Klass part in an instanceKlass.
  32 
  33 // ------------------------------------------------------------------
  34 // ciInstanceKlass::ciInstanceKlass
  35 //
  36 // Loaded instance klass.
  37 ciInstanceKlass::ciInstanceKlass(KlassHandle h_k) :
  38   ciKlass(h_k), _non_static_fields(NULL)
  39 {
  40   assert(get_Klass()->oop_is_instance(), "wrong type");
  41   instanceKlass* ik = get_instanceKlass();
  42 
  43   AccessFlags access_flags = ik->access_flags();
  44   _flags = ciFlags(access_flags);
  45   _has_finalizer = access_flags.has_finalizer();
  46   _has_subklass = ik->subklass() != NULL;




   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 #include "precompiled.hpp"
  26 #include "ci/ciField.hpp"
  27 #include "ci/ciInstance.hpp"
  28 #include "ci/ciInstanceKlass.hpp"
  29 #include "ci/ciUtilities.hpp"
  30 #include "classfile/systemDictionary.hpp"
  31 #include "memory/allocation.hpp"
  32 #include "memory/allocation.inline.hpp"
  33 #include "oops/oop.inline.hpp"
  34 #include "runtime/fieldDescriptor.hpp"
  35 
  36 // ciInstanceKlass
  37 //
  38 // This class represents a klassOop in the HotSpot virtual machine
  39 // whose Klass part in an instanceKlass.
  40 
  41 // ------------------------------------------------------------------
  42 // ciInstanceKlass::ciInstanceKlass
  43 //
  44 // Loaded instance klass.
  45 ciInstanceKlass::ciInstanceKlass(KlassHandle h_k) :
  46   ciKlass(h_k), _non_static_fields(NULL)
  47 {
  48   assert(get_Klass()->oop_is_instance(), "wrong type");
  49   instanceKlass* ik = get_instanceKlass();
  50 
  51   AccessFlags access_flags = ik->access_flags();
  52   _flags = ciFlags(access_flags);
  53   _has_finalizer = access_flags.has_finalizer();
  54   _has_subklass = ik->subklass() != NULL;