1964 field_array[TypeFunc::Parms+1] = Type::HALF; 1965 break; 1966 case T_OBJECT: 1967 case T_ARRAY: 1968 case T_BOOLEAN: 1969 case T_CHAR: 1970 case T_FLOAT: 1971 case T_BYTE: 1972 case T_SHORT: 1973 case T_INT: 1974 field_array[TypeFunc::Parms] = get_const_type(return_type); 1975 break; 1976 case T_VALUETYPE: 1977 if (ret_vt_fields) { 1978 ciValueKlass* vk = (ciValueKlass*)return_type; 1979 uint pos = TypeFunc::Parms; 1980 field_array[pos] = TypePtr::BOTTOM; 1981 pos++; 1982 collect_value_fields(vk, field_array, pos); 1983 } else { 1984 // Value type returns cannot be NULL 1985 //field_array[TypeFunc::Parms] = get_const_type(return_type)->join_speculative(TypePtr::NOTNULL); 1986 field_array[TypeFunc::Parms] = get_const_type(return_type); 1987 } 1988 break; 1989 case T_VOID: 1990 break; 1991 default: 1992 ShouldNotReachHere(); 1993 } 1994 return (TypeTuple*)(new TypeTuple(TypeFunc::Parms + arg_cnt, field_array))->hashcons(); 1995 } 1996 1997 // Make a TypeTuple from the domain of a method signature 1998 const TypeTuple *TypeTuple::make_domain(ciInstanceKlass* recv, ciSignature* sig, bool vt_fields_as_args) { 1999 uint arg_cnt = sig->size(); 2000 2001 int vt_extra = 0; 2002 if (vt_fields_as_args) { 2003 for (int i = 0; i < sig->count(); i++) { 2004 ciType* type = sig->type_at(i); 2005 if (type->basic_type() == T_VALUETYPE) { 2006 assert(type->is_valuetype(), "inconsistent type"); | 1964 field_array[TypeFunc::Parms+1] = Type::HALF; 1965 break; 1966 case T_OBJECT: 1967 case T_ARRAY: 1968 case T_BOOLEAN: 1969 case T_CHAR: 1970 case T_FLOAT: 1971 case T_BYTE: 1972 case T_SHORT: 1973 case T_INT: 1974 field_array[TypeFunc::Parms] = get_const_type(return_type); 1975 break; 1976 case T_VALUETYPE: 1977 if (ret_vt_fields) { 1978 ciValueKlass* vk = (ciValueKlass*)return_type; 1979 uint pos = TypeFunc::Parms; 1980 field_array[pos] = TypePtr::BOTTOM; 1981 pos++; 1982 collect_value_fields(vk, field_array, pos); 1983 } else { 1984 // A NULL ValueType cannot be returned to compiled code. The 'areturn' bytecode 1985 // handler will deoptimize its caller if it is about to return a NULL ValueType. 1986 field_array[TypeFunc::Parms] = get_const_type(return_type)->join_speculative(TypePtr::NOTNULL); 1987 } 1988 break; 1989 case T_VOID: 1990 break; 1991 default: 1992 ShouldNotReachHere(); 1993 } 1994 return (TypeTuple*)(new TypeTuple(TypeFunc::Parms + arg_cnt, field_array))->hashcons(); 1995 } 1996 1997 // Make a TypeTuple from the domain of a method signature 1998 const TypeTuple *TypeTuple::make_domain(ciInstanceKlass* recv, ciSignature* sig, bool vt_fields_as_args) { 1999 uint arg_cnt = sig->size(); 2000 2001 int vt_extra = 0; 2002 if (vt_fields_as_args) { 2003 for (int i = 0; i < sig->count(); i++) { 2004 ciType* type = sig->type_at(i); 2005 if (type->basic_type() == T_VALUETYPE) { 2006 assert(type->is_valuetype(), "inconsistent type"); |