< prev index next >

src/hotspot/share/opto/cfgnode.cpp

Print this page
rev 48500 : 8194988: 8 Null pointer dereference defect groups related to MultiNode::proj_out()


2356 
2357   return ( in(0)->is_CatchProj() && in(0)->in(0)->in(1) == in(1) )
2358     ? this
2359     : call->in(TypeFunc::Parms);
2360 }
2361 
2362 //=============================================================================
2363 //------------------------------Value------------------------------------------
2364 // Check for being unreachable.
2365 const Type* NeverBranchNode::Value(PhaseGVN* phase) const {
2366   if (!in(0) || in(0)->is_top()) return Type::TOP;
2367   return bottom_type();
2368 }
2369 
2370 //------------------------------Ideal------------------------------------------
2371 // Check for no longer being part of a loop
2372 Node *NeverBranchNode::Ideal(PhaseGVN *phase, bool can_reshape) {
2373   if (can_reshape && !in(0)->is_Loop()) {
2374     // Dead code elimination can sometimes delete this projection so
2375     // if it's not there, there's nothing to do.
2376     Node* fallthru = proj_out(0);
2377     if (fallthru != NULL) {
2378       phase->is_IterGVN()->replace_node(fallthru, in(0));
2379     }
2380     return phase->C->top();
2381   }
2382   return NULL;
2383 }
2384 
2385 #ifndef PRODUCT
2386 void NeverBranchNode::format( PhaseRegAlloc *ra_, outputStream *st) const {
2387   st->print("%s", Name());
2388 }
2389 #endif


2356 
2357   return ( in(0)->is_CatchProj() && in(0)->in(0)->in(1) == in(1) )
2358     ? this
2359     : call->in(TypeFunc::Parms);
2360 }
2361 
2362 //=============================================================================
2363 //------------------------------Value------------------------------------------
2364 // Check for being unreachable.
2365 const Type* NeverBranchNode::Value(PhaseGVN* phase) const {
2366   if (!in(0) || in(0)->is_top()) return Type::TOP;
2367   return bottom_type();
2368 }
2369 
2370 //------------------------------Ideal------------------------------------------
2371 // Check for no longer being part of a loop
2372 Node *NeverBranchNode::Ideal(PhaseGVN *phase, bool can_reshape) {
2373   if (can_reshape && !in(0)->is_Loop()) {
2374     // Dead code elimination can sometimes delete this projection so
2375     // if it's not there, there's nothing to do.
2376     Node* fallthru = proj_out_or_null(0);
2377     if (fallthru != NULL) {
2378       phase->is_IterGVN()->replace_node(fallthru, in(0));
2379     }
2380     return phase->C->top();
2381   }
2382   return NULL;
2383 }
2384 
2385 #ifndef PRODUCT
2386 void NeverBranchNode::format( PhaseRegAlloc *ra_, outputStream *st) const {
2387   st->print("%s", Name());
2388 }
2389 #endif
< prev index next >