int size = 0;
ResourceMark rm(THREAD);
for (SignatureStream ss(symbol->get_symbol()); !ss.is_done(); ss.next()) { // Process one element of the signature
ciType* type = NULL;
if (ss.is_reference()) {
ciSymbol* klass_name = env->get_symbol(ss.as_symbol());
type = env->get_klass_by_name_impl(_accessing_klass, cpool, klass_name, false);
} else {
type = ciType::make(ss.type());
}
if (ss.at_return_type()) { // don't include return type in size calculation
_return_type = type;
} else {
_types.append(type);
size += type->size();
}
}
_size = size;
}
// ------------------------------------------------------------------ // 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
if (_types.length() != that->_types.length()) { return false;
}
for (int i = 0; i < _types.length(); 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;
} returntrue;
}
// ------------------------------------------------------------------ // ciSignature::has_unloaded_classes // // Reports if there are any unloaded classes present in the signature. // Each ciSignature when instantiated is resolved against some accessing class // and the resolved classes aren't required to be local, but can be revealed // through loader constraints. bool ciSignature::has_unloaded_classes() {
for (ciSignatureStream str(this); !str.is_done(); str.next()) {
if (!str.type()->is_loaded()) { returntrue;
}
} return false;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.