< prev index next >

src/hotspot/share/opto/parse1.cpp

Print this page

        

*** 2375,2399 **** // Handle exact value type to Object return assert(tr->isa_instptr()->klass()->is_java_lang_Object(), "must be java.lang.Object"); ValueTypeNode* vt = value->as_ValueType()->allocate(this)->as_ValueType(); value = ValueTypePtrNode::make_from_value_type(_gvn, vt); } else if (phi->bottom_type()->isa_valuetype() && !value->is_ValueType()) { ! Node* null_ctl = top(); ! Node* not_null_obj = null_check_common(value, T_VALUETYPE, false, &null_ctl, false); ! if (null_ctl != top()) { ! // TODO For now, we just deoptimize if value type is NULL ! PreserveJVMState pjvms(this); ! set_control(null_ctl); ! replace_in_map(value, null()); inc_sp(1); uncommon_trap(Deoptimization::Reason_null_check, Deoptimization::Action_none); ! } ! if (stopped()) { ! value = null(); ! } else { ! value = ValueTypeNode::make_from_oop(this, not_null_obj, phi->bottom_type()->isa_valuetype()->value_klass()); ! } } else { // Handle returns of oop-arrays to an arrays-of-interface return const TypeInstPtr* phi_tip; const TypeInstPtr* val_tip; Type::get_arrays_base_elements(phi->bottom_type(), value->bottom_type(), &phi_tip, &val_tip); --- 2375,2389 ---- // Handle exact value type to Object return assert(tr->isa_instptr()->klass()->is_java_lang_Object(), "must be java.lang.Object"); ValueTypeNode* vt = value->as_ValueType()->allocate(this)->as_ValueType(); value = ValueTypePtrNode::make_from_value_type(_gvn, vt); } else if (phi->bottom_type()->isa_valuetype() && !value->is_ValueType()) { ! assert(value->bottom_type()->remove_speculative() == TypePtr::NULL_PTR, "Anything other than null?"); inc_sp(1); uncommon_trap(Deoptimization::Reason_null_check, Deoptimization::Action_none); ! dec_sp(1); ! return; } else { // Handle returns of oop-arrays to an arrays-of-interface return const TypeInstPtr* phi_tip; const TypeInstPtr* val_tip; Type::get_arrays_base_elements(phi->bottom_type(), value->bottom_type(), &phi_tip, &val_tip);
< prev index next >