mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-09 21:19:38 +00:00
8383851: TypeInstPtr::get_const_boxed_value is unused since JDK-8149813
Reviewed-by: aseoane, thartmann
This commit is contained in:
parent
7bf1de524c
commit
4e1dd4daba
@ -4066,29 +4066,6 @@ const TypeInterfaces* TypePtr::interfaces(ciKlass*& k, bool klass, bool interfac
|
||||
return TypeAryPtr::_array_interfaces;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create constant type for a constant boxed value
|
||||
*/
|
||||
const Type* TypeInstPtr::get_const_boxed_value() const {
|
||||
assert(is_ptr_to_boxed_value(), "should be called only for boxed value");
|
||||
assert((const_oop() != nullptr), "should be called only for constant object");
|
||||
ciConstant constant = const_oop()->as_instance()->field_value_by_offset(offset());
|
||||
BasicType bt = constant.basic_type();
|
||||
switch (bt) {
|
||||
case T_BOOLEAN: return TypeInt::make(constant.as_boolean());
|
||||
case T_INT: return TypeInt::make(constant.as_int());
|
||||
case T_CHAR: return TypeInt::make(constant.as_char());
|
||||
case T_BYTE: return TypeInt::make(constant.as_byte());
|
||||
case T_SHORT: return TypeInt::make(constant.as_short());
|
||||
case T_FLOAT: return TypeF::make(constant.as_float());
|
||||
case T_DOUBLE: return TypeD::make(constant.as_double());
|
||||
case T_LONG: return TypeLong::make(constant.as_long());
|
||||
default: break;
|
||||
}
|
||||
fatal("Invalid boxed value type '%s'", type2name(bt));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//------------------------------cast_to_ptr_type-------------------------------
|
||||
const TypeInstPtr* TypeInstPtr::cast_to_ptr_type(PTR ptr) const {
|
||||
if( ptr == _ptr ) return this;
|
||||
|
||||
@ -1586,9 +1586,6 @@ public:
|
||||
return make(ptr, k, interfaces, xk, o, offset, instance_id);
|
||||
}
|
||||
|
||||
/** Create constant type for a constant boxed value */
|
||||
const Type* get_const_boxed_value() const;
|
||||
|
||||
// If this is a java.lang.Class constant, return the type for it or null.
|
||||
// Pass to Type::get_const_type to turn it to a type, which will usually
|
||||
// be a TypeInstPtr, but may also be a TypeInt::INT for int.class, etc.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user