479 if (new_jvms == NULL) return; // no change 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 521 kit.replace_call(call, result, true); 522 } 523 | 479 if (new_jvms == NULL) return; // no change 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 ValueTypeNode* vt = result->as_ValueType(); 500 if (!call->tf()->returns_value_type_as_fields()) { 501 result = vt->allocate(&kit); 502 result = C->initial_gvn()->transform(new ValueTypePtrNode(vt, result, C)); 503 } else { 504 // Return of multiple values (the fields of a value type) 505 vt->replace_call_results(call, C); 506 } 507 } else { 508 assert(result->is_top(), "what else?"); 509 for (DUIterator_Fast imax, i = call->fast_outs(imax); i < imax; i++) { 510 ProjNode *pn = call->fast_out(i)->as_Proj(); 511 uint con = pn->_con; 512 if (con >= TypeFunc::Parms) { 513 // C->gvn_replace_by(pn, C->top()); 514 C->initial_gvn()->hash_delete(pn); 515 pn->set_req(0, C->top()); 516 --i; --imax; 517 } 518 } 519 } 520 } 521 522 kit.replace_call(call, result, true); 523 } 524 |