src/share/vm/ci/ciSignature.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7092712 Sdiff src/share/vm/ci

src/share/vm/ci/ciSignature.cpp

Print this page




  63         env->record_out_of_memory_failure();
  64         CLEAR_PENDING_EXCEPTION;
  65       } else {
  66         ciSymbol* klass_name = env->get_symbol(name);
  67         type = env->get_klass_by_name_impl(_accessing_klass, cpool, klass_name, false);
  68       }
  69     }
  70     _types->append(type);
  71     if (ss.at_return_type()) {
  72       // Done processing the return type; do not add it into the count.
  73       break;
  74     }
  75     size += type->size();
  76     count++;
  77   }
  78   _size = size;
  79   _count = count;
  80 }
  81 
  82 // ------------------------------------------------------------------
  83 // ciSignature::return_ciType
  84 //
  85 // What is the return type of this signature?
  86 ciType* ciSignature::return_type() const {
  87   return _types->at(_count);
  88 }
  89 
  90 // ------------------------------------------------------------------
  91 // ciSignature::ciType_at
  92 //
  93 // What is the type of the index'th element of this
  94 // signature?
  95 ciType* ciSignature::type_at(int index) const {
  96   assert(index < _count, "out of bounds");
  97   // The first _klasses element holds the return klass.
  98   return _types->at(index);
  99 }
 100 
 101 // ------------------------------------------------------------------


















 102 // ciSignature::print_signature
 103 void ciSignature::print_signature() {
 104   _symbol->print_symbol();
 105 }
 106 
 107 // ------------------------------------------------------------------
 108 // ciSignature::print
 109 void ciSignature::print() {
 110   tty->print("<ciSignature symbol=");
 111   print_signature();
 112  tty->print(" accessing_klass=");
 113   _accessing_klass->print();
 114   tty->print(" address=0x%x>", (address)this);
 115 }


  63         env->record_out_of_memory_failure();
  64         CLEAR_PENDING_EXCEPTION;
  65       } else {
  66         ciSymbol* klass_name = env->get_symbol(name);
  67         type = env->get_klass_by_name_impl(_accessing_klass, cpool, klass_name, false);
  68       }
  69     }
  70     _types->append(type);
  71     if (ss.at_return_type()) {
  72       // Done processing the return type; do not add it into the count.
  73       break;
  74     }
  75     size += type->size();
  76     count++;
  77   }
  78   _size = size;
  79   _count = count;
  80 }
  81 
  82 // ------------------------------------------------------------------
  83 // ciSignature::return_type
  84 //
  85 // What is the return type of this signature?
  86 ciType* ciSignature::return_type() const {
  87   return _types->at(_count);
  88 }
  89 
  90 // ------------------------------------------------------------------
  91 // ciSignature::type_at
  92 //
  93 // What is the type of the index'th element of this
  94 // signature?
  95 ciType* ciSignature::type_at(int index) const {
  96   assert(index < _count, "out of bounds");
  97   // The first _klasses element holds the return klass.
  98   return _types->at(index);
  99 }
 100 
 101 // ------------------------------------------------------------------
 102 // ciSignature::equals
 103 //
 104 // Compare this signature to another one.  Signatures with different
 105 // accessing classes but with signature-types resolved to the same
 106 // types are defined to be equal.
 107 bool ciSignature::equals(ciSignature* that) {
 108   // Compare signature
 109   if (!this->as_symbol()->equals(that->as_symbol()))  return false;
 110   // Compare all types of the arguments
 111   for (int i = 0; i < _count; i++) {
 112     if (this->type_at(i) != that->type_at(i))         return false;
 113   }
 114   // Compare the return type
 115   if (this->return_type() != that->return_type())     return false;
 116   return true;
 117 }
 118 
 119 // ------------------------------------------------------------------
 120 // ciSignature::print_signature
 121 void ciSignature::print_signature() {
 122   _symbol->print_symbol();
 123 }
 124 
 125 // ------------------------------------------------------------------
 126 // ciSignature::print
 127 void ciSignature::print() {
 128   tty->print("<ciSignature symbol=");
 129   print_signature();
 130  tty->print(" accessing_klass=");
 131   _accessing_klass->print();
 132   tty->print(" address=0x%x>", (address)this);
 133 }
src/share/vm/ci/ciSignature.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File