< prev index next >

src/share/vm/opto/callGenerator.cpp

Print this page




 480   if (C->failing())      return;
 481 
 482   // Capture any exceptional control flow
 483   GraphKit kit(new_jvms);
 484 
 485   // Find the result object
 486   Node* result = C->top();
 487   ciType* return_type = _inline_cg->method()->return_type();
 488   int result_size = return_type->size();
 489   if (result_size != 0 && !kit.stopped()) {
 490     result = (result_size == 1) ? kit.pop() : kit.pop_pair();
 491   }
 492 
 493   C->set_has_loops(C->has_loops() || _inline_cg->method()->has_loops());
 494   C->env()->notice_inlined_method(_inline_cg->method());
 495   C->set_inlining_progress(true);
 496   
 497   if (return_type->is_valuetype() && return_type != C->env()->___Value_klass()) {
 498     if (result->is_ValueType()) {
 499       if (!call->tf()->returns_value_type_as_fields()) {
 500         result = result->as_ValueType()->store_to_memory(&kit);
 501       } else {
 502         // Return of multiple values (the fields of a value type)
 503         ValueTypeNode* vt = result->as_ValueType();
 504         vt->replace_call_results(call, C);
 505       }
 506     } else {
 507       assert(result->is_top(), "what else?");
 508       for (DUIterator_Fast imax, i = call->fast_outs(imax); i < imax; i++) {
 509         ProjNode *pn = call->fast_out(i)->as_Proj();
 510         uint con = pn->_con;
 511         if (con >= TypeFunc::Parms) {
 512           // C->gvn_replace_by(pn, C->top());
 513           C->initial_gvn()->hash_delete(pn);
 514           pn->set_req(0, C->top());
 515           --i; --imax;
 516         }
 517       }
 518     }
 519   }
 520 




 480   if (C->failing())      return;
 481 
 482   // Capture any exceptional control flow
 483   GraphKit kit(new_jvms);
 484 
 485   // Find the result object
 486   Node* result = C->top();
 487   ciType* return_type = _inline_cg->method()->return_type();
 488   int result_size = return_type->size();
 489   if (result_size != 0 && !kit.stopped()) {
 490     result = (result_size == 1) ? kit.pop() : kit.pop_pair();
 491   }
 492 
 493   C->set_has_loops(C->has_loops() || _inline_cg->method()->has_loops());
 494   C->env()->notice_inlined_method(_inline_cg->method());
 495   C->set_inlining_progress(true);
 496 
 497   if (return_type->is_valuetype() && return_type != C->env()->___Value_klass()) {
 498     if (result->is_ValueType()) {
 499       if (!call->tf()->returns_value_type_as_fields()) {
 500         result = result->as_ValueType()->allocate(&kit);
 501       } else {
 502         // Return of multiple values (the fields of a value type)
 503         ValueTypeNode* vt = result->as_ValueType();
 504         vt->replace_call_results(call, C);
 505       }
 506     } else {
 507       assert(result->is_top(), "what else?");
 508       for (DUIterator_Fast imax, i = call->fast_outs(imax); i < imax; i++) {
 509         ProjNode *pn = call->fast_out(i)->as_Proj();
 510         uint con = pn->_con;
 511         if (con >= TypeFunc::Parms) {
 512           // C->gvn_replace_by(pn, C->top());
 513           C->initial_gvn()->hash_delete(pn);
 514           pn->set_req(0, C->top());
 515           --i; --imax;
 516         }
 517       }
 518     }
 519   }
 520 


< prev index next >