--- a/hotspot/src/share/vm/ci/ciSignature.cpp Tue Oct 11 02:19:37 2011 -0700
+++ b/hotspot/src/share/vm/ci/ciSignature.cpp Wed Oct 12 21:00:13 2011 -0700
@@ -80,7 +80,7 @@
}
// ------------------------------------------------------------------
-// ciSignature::return_ciType
+// ciSignature::return_type
//
// What is the return type of this signature?
ciType* ciSignature::return_type() const {
@@ -88,7 +88,7 @@
}
// ------------------------------------------------------------------
-// ciSignature::ciType_at
+// ciSignature::type_at
//
// What is the type of the index'th element of this
// signature?
@@ -99,6 +99,24 @@
}
// ------------------------------------------------------------------
+// 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();