src/share/vm/ci/ciSignature.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/ci/ciSignature.cpp Wed Oct 12 04:37:44 2011
--- new/src/share/vm/ci/ciSignature.cpp Wed Oct 12 04:37:44 2011
*** 78,106 ****
--- 78,124 ----
_size = size;
_count = count;
}
// ------------------------------------------------------------------
! // ciSignature::return_ciType
! // ciSignature::return_type
//
// What is the return type of this signature?
ciType* ciSignature::return_type() const {
return _types->at(_count);
}
// ------------------------------------------------------------------
! // ciSignature::ciType_at
! // ciSignature::type_at
//
// What is the type of the index'th element of this
// signature?
ciType* ciSignature::type_at(int index) const {
assert(index < _count, "out of bounds");
// The first _klasses element holds the return klass.
return _types->at(index);
}
// ------------------------------------------------------------------
+ // ciSignature::equals
+ //
+ // Compare this signature to another one. Signatures with different
+ // accessing classes but with signature-types resolved to the same
+ // types are defined to be equal.
+ bool ciSignature::equals(ciSignature* that) {
+ // Compare signature
+ if (!this->as_symbol()->equals(that->as_symbol())) return false;
+ // Compare all types of the arguments
+ for (int i = 0; i < _count; i++) {
+ if (this->type_at(i) != that->type_at(i)) return false;
+ }
+ // Compare the return type
+ if (this->return_type() != that->return_type()) return false;
+ return true;
+ }
+
+ // ------------------------------------------------------------------
// ciSignature::print_signature
void ciSignature::print_signature() {
_symbol->print_symbol();
}
src/share/vm/ci/ciSignature.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File