244 assert(type == ciTypeFlow::StateVector::null_type(), ""); 245 return TypePtr::NULL_PTR; 246 247 case ciTypeFlow::StateVector::T_LONG2: 248 // The ciTypeFlow pass pushes a long, then the half. 249 // We do the same. 250 assert(type == ciTypeFlow::StateVector::long2_type(), ""); 251 return TypeInt::TOP; 252 253 case ciTypeFlow::StateVector::T_DOUBLE2: 254 // The ciTypeFlow pass pushes double, then the half. 255 // Our convention is the same. 256 assert(type == ciTypeFlow::StateVector::double2_type(), ""); 257 return Type::TOP; 258 259 case T_ADDRESS: 260 assert(type->is_return_address(), ""); 261 return TypeRawPtr::make((address)(intptr_t)type->as_return_address()->bci()); 262 263 case T_VALUETYPE: 264 return TypeValueType::make(type->as_value_klass()); 265 266 default: 267 // make sure we did not mix up the cases: 268 assert(type != ciTypeFlow::StateVector::bottom_type(), ""); 269 assert(type != ciTypeFlow::StateVector::top_type(), ""); 270 assert(type != ciTypeFlow::StateVector::null_type(), ""); 271 assert(type != ciTypeFlow::StateVector::long2_type(), ""); 272 assert(type != ciTypeFlow::StateVector::double2_type(), ""); 273 assert(!type->is_return_address(), ""); 274 275 return Type::get_const_type(type); 276 } 277 } 278 279 280 //-----------------------make_from_constant------------------------------------ 281 const Type* Type::make_from_constant(ciConstant constant, bool require_constant, 282 int stable_dimension, bool is_narrow_oop, 283 bool is_autobox_cache) { 284 switch (constant.basic_type()) { | 244 assert(type == ciTypeFlow::StateVector::null_type(), ""); 245 return TypePtr::NULL_PTR; 246 247 case ciTypeFlow::StateVector::T_LONG2: 248 // The ciTypeFlow pass pushes a long, then the half. 249 // We do the same. 250 assert(type == ciTypeFlow::StateVector::long2_type(), ""); 251 return TypeInt::TOP; 252 253 case ciTypeFlow::StateVector::T_DOUBLE2: 254 // The ciTypeFlow pass pushes double, then the half. 255 // Our convention is the same. 256 assert(type == ciTypeFlow::StateVector::double2_type(), ""); 257 return Type::TOP; 258 259 case T_ADDRESS: 260 assert(type->is_return_address(), ""); 261 return TypeRawPtr::make((address)(intptr_t)type->as_return_address()->bci()); 262 263 case T_VALUETYPE: 264 if (type == ciEnv::current()->___Value_klass()) { 265 return TypeValueTypePtr::NOTNULL; 266 } else { 267 return TypeValueType::make(type->as_value_klass()); 268 } 269 270 default: 271 // make sure we did not mix up the cases: 272 assert(type != ciTypeFlow::StateVector::bottom_type(), ""); 273 assert(type != ciTypeFlow::StateVector::top_type(), ""); 274 assert(type != ciTypeFlow::StateVector::null_type(), ""); 275 assert(type != ciTypeFlow::StateVector::long2_type(), ""); 276 assert(type != ciTypeFlow::StateVector::double2_type(), ""); 277 assert(!type->is_return_address(), ""); 278 279 return Type::get_const_type(type); 280 } 281 } 282 283 284 //-----------------------make_from_constant------------------------------------ 285 const Type* Type::make_from_constant(ciConstant constant, bool require_constant, 286 int stable_dimension, bool is_narrow_oop, 287 bool is_autobox_cache) { 288 switch (constant.basic_type()) { |