< prev index next >
src/hotspot/share/c1/c1_LIR.cpp
Print this page
*** 1062,1081 ****
masm->emit_call(this);
}
bool LIR_OpJavaCall::maybe_return_as_fields(ciValueKlass** vk_ret) const {
if (ValueTypeReturnedAsFields) {
! if (method()->signature()->returns_never_null()) {
ciType* return_type = method()->return_type();
if (return_type->is_valuetype()) {
ciValueKlass* vk = return_type->as_value_klass();
if (vk->can_be_returned_as_fields()) {
if (vk_ret != NULL) {
*vk_ret = vk;
}
return true;
}
}
} else if (is_method_handle_invoke()) {
BasicType bt = method()->return_type()->basic_type();
if (bt == T_OBJECT || bt == T_VALUETYPE) {
// A value type might be returned from the call but we don't know its
--- 1062,1087 ----
masm->emit_call(this);
}
bool LIR_OpJavaCall::maybe_return_as_fields(ciValueKlass** vk_ret) const {
if (ValueTypeReturnedAsFields) {
! if (method()->signature()->maybe_returns_never_null()) {
ciType* return_type = method()->return_type();
if (return_type->is_valuetype()) {
ciValueKlass* vk = return_type->as_value_klass();
if (vk->can_be_returned_as_fields()) {
if (vk_ret != NULL) {
*vk_ret = vk;
}
return true;
}
+ } else {
+ assert(return_type->is_instance_klass() && !return_type->as_instance_klass()->is_loaded(), "must be");
+ if (vk_ret != NULL) {
+ *vk_ret = NULL;
+ }
+ return true;
}
} else if (is_method_handle_invoke()) {
BasicType bt = method()->return_type()->basic_type();
if (bt == T_OBJECT || bt == T_VALUETYPE) {
// A value type might be returned from the call but we don't know its
< prev index next >