/* * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
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())) { returnfalse;
} // Compare all types of the arguments if (_types.length() != that->_types.length()) { returnfalse;
} for (int i = 0; i < _types.length(); i++) { if (this->type_at(i) != that->type_at(i)) { returnfalse;
}
} // Compare the return type if (this->return_type() != that->return_type()) { returnfalse;
} 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;
}
} returnfalse;
}
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 ist noch experimentell.