< prev index next >

src/share/vm/ci/ciKlass.cpp

Print this page




  49 //
  50 // Nameless klass variant.
  51 ciKlass::ciKlass(KlassHandle h_k, ciSymbol* name) : ciType(h_k) {
  52   assert(get_Klass()->is_klass(), "wrong type");
  53   _name = name;
  54   _layout_helper = Klass::_lh_neutral_value;
  55 }
  56 
  57 // ------------------------------------------------------------------
  58 // ciKlass::ciKlass
  59 //
  60 // Unloaded klass variant.
  61 ciKlass::ciKlass(ciSymbol* name, BasicType bt) : ciType(bt) {
  62   _name = name;
  63   _layout_helper = Klass::_lh_neutral_value;
  64 }
  65 
  66 // ------------------------------------------------------------------
  67 // ciKlass::is_subtype_of
  68 bool ciKlass::is_subtype_of(ciKlass* that) {
  69   assert(this->is_loaded(), err_msg("must be loaded: %s", this->name()->as_quoted_ascii()));
  70   assert(that->is_loaded(), err_msg("must be loaded: %s", that->name()->as_quoted_ascii()));
  71 
  72   // Check to see if the klasses are identical.
  73   if (this == that) {
  74     return true;
  75   }
  76 
  77   VM_ENTRY_MARK;
  78   Klass* this_klass = get_Klass();
  79   Klass* that_klass = that->get_Klass();
  80   bool result = this_klass->is_subtype_of(that_klass);
  81 
  82   return result;
  83 }
  84 
  85 // ------------------------------------------------------------------
  86 // ciKlass::is_subclass_of
  87 bool ciKlass::is_subclass_of(ciKlass* that) {
  88   assert(this->is_loaded(), err_msg("must be loaded: %s", this->name()->as_quoted_ascii()));
  89   assert(that->is_loaded(), err_msg("must be loaded: %s", that->name()->as_quoted_ascii()));
  90 
  91   VM_ENTRY_MARK;
  92   Klass* this_klass = get_Klass();
  93   Klass* that_klass = that->get_Klass();
  94   bool result = this_klass->is_subclass_of(that_klass);
  95 
  96   return result;
  97 }
  98 
  99 // ------------------------------------------------------------------
 100 // ciKlass::super_depth
 101 juint ciKlass::super_depth() {
 102   assert(is_loaded(), "must be loaded");
 103 
 104   VM_ENTRY_MARK;
 105   Klass* this_klass = get_Klass();
 106   return this_klass->super_depth();
 107 }
 108 
 109 // ------------------------------------------------------------------




  49 //
  50 // Nameless klass variant.
  51 ciKlass::ciKlass(KlassHandle h_k, ciSymbol* name) : ciType(h_k) {
  52   assert(get_Klass()->is_klass(), "wrong type");
  53   _name = name;
  54   _layout_helper = Klass::_lh_neutral_value;
  55 }
  56 
  57 // ------------------------------------------------------------------
  58 // ciKlass::ciKlass
  59 //
  60 // Unloaded klass variant.
  61 ciKlass::ciKlass(ciSymbol* name, BasicType bt) : ciType(bt) {
  62   _name = name;
  63   _layout_helper = Klass::_lh_neutral_value;
  64 }
  65 
  66 // ------------------------------------------------------------------
  67 // ciKlass::is_subtype_of
  68 bool ciKlass::is_subtype_of(ciKlass* that) {
  69   assert(this->is_loaded(), "must be loaded: %s", this->name()->as_quoted_ascii());
  70   assert(that->is_loaded(), "must be loaded: %s", that->name()->as_quoted_ascii());
  71 
  72   // Check to see if the klasses are identical.
  73   if (this == that) {
  74     return true;
  75   }
  76 
  77   VM_ENTRY_MARK;
  78   Klass* this_klass = get_Klass();
  79   Klass* that_klass = that->get_Klass();
  80   bool result = this_klass->is_subtype_of(that_klass);
  81 
  82   return result;
  83 }
  84 
  85 // ------------------------------------------------------------------
  86 // ciKlass::is_subclass_of
  87 bool ciKlass::is_subclass_of(ciKlass* that) {
  88   assert(this->is_loaded(), "must be loaded: %s", this->name()->as_quoted_ascii());
  89   assert(that->is_loaded(), "must be loaded: %s", that->name()->as_quoted_ascii());
  90 
  91   VM_ENTRY_MARK;
  92   Klass* this_klass = get_Klass();
  93   Klass* that_klass = that->get_Klass();
  94   bool result = this_klass->is_subclass_of(that_klass);
  95 
  96   return result;
  97 }
  98 
  99 // ------------------------------------------------------------------
 100 // ciKlass::super_depth
 101 juint ciKlass::super_depth() {
 102   assert(is_loaded(), "must be loaded");
 103 
 104   VM_ENTRY_MARK;
 105   Klass* this_klass = get_Klass();
 106   return this_klass->super_depth();
 107 }
 108 
 109 // ------------------------------------------------------------------


< prev index next >