< prev index next >
src/share/vm/opto/cfgnode.cpp
Print this page
@@ -942,18 +942,13 @@
// convert the one to the other.
const TypePtr* ttp = _type->make_ptr();
const TypeInstPtr* ttip = (ttp != NULL) ? ttp->isa_instptr() : NULL;
const TypeKlassPtr* ttkp = (ttp != NULL) ? ttp->isa_klassptr() : NULL;
bool is_intf = false;
- if (ttip != NULL) {
- ciKlass* k = ttip->klass();
- if (k->is_loaded() && k->is_interface())
+ if (ttip != NULL && ttip->is_loaded() && ttip->klass()->is_interface()) {
is_intf = true;
- }
- if (ttkp != NULL) {
- ciKlass* k = ttkp->klass();
- if (k->is_loaded() && k->is_interface())
+ } else if (ttkp != NULL && ttkp->is_loaded() && ttkp->klass()->is_interface()) {
is_intf = true;
}
// Default case: merge all inputs
const Type *t = Type::TOP; // Merged type starting value
@@ -1007,13 +1002,13 @@
// both implement interface I, but their meet is at 'j/l/O' which
// doesn't implement I, we have no way to tell if the result should
// be 'I' or 'j/l/O'. Thus we'll pick 'j/l/O'. If this then flows
// into a Phi which "knows" it's an Interface type we'll have to
// uplift the type.
- if (!t->empty() && ttip && ttip->is_loaded() && ttip->klass()->is_interface()) {
+ if (!t->empty() && ttip != NULL && ttip->is_loaded() && ttip->klass()->is_interface()) {
assert(ft == _type, ""); // Uplift to interface
- } else if (!t->empty() && ttkp && ttkp->is_loaded() && ttkp->klass()->is_interface()) {
+ } else if (!t->empty() && ttkp != NULL && ttkp->is_loaded() && ttkp->klass()->is_interface()) {
assert(ft == _type, ""); // Uplift to interface
} else {
// We also have to handle 'evil cases' of interface- vs. class-arrays
Type::get_arrays_base_elements(jt, _type, NULL, &ttip);
if (!t->empty() && ttip != NULL && ttip->is_loaded() && ttip->klass()->is_interface()) {
< prev index next >