< prev index next >
src/hotspot/share/opto/type.cpp
Print this page
@@ -2401,12 +2401,12 @@
}
//==============================TypeValueType=======================================
//------------------------------make-------------------------------------------
-const TypeValueType* TypeValueType::make(ciValueKlass* vk) {
- return (TypeValueType*)(new TypeValueType(vk))->hashcons();
+const TypeValueType* TypeValueType::make(ciValueKlass* vk, bool larval) {
+ return (TypeValueType*)(new TypeValueType(vk, larval))->hashcons();
}
//------------------------------meet-------------------------------------------
// Compute the MEET of two types. It returns a new Type object.
const Type* TypeValueType::xmeet(const Type* t) const {
@@ -2450,10 +2450,19 @@
return t->xmeet(this);
}
case ValueType: {
// All value types inherit from Object
+ const TypeValueType* other = t->is_valuetype();
+ if (_vk == other->_vk) {
+ if (_larval == other->_larval ||
+ !_larval) {
+ return this;
+ } else {
+ return t;
+ }
+ }
return TypeInstPtr::NOTNULL;
}
default: // All else is a mistake
typerr(t);
@@ -2469,11 +2478,11 @@
//------------------------------eq---------------------------------------------
// Structural equality check for Type representations
bool TypeValueType::eq(const Type* t) const {
const TypeValueType* vt = t->is_valuetype();
- return (_vk == vt->value_klass());
+ return (_vk == vt->value_klass() && _larval == vt->larval());
}
//------------------------------hash-------------------------------------------
// Type-specific hashing function.
int TypeValueType::hash(void) const {
@@ -2499,11 +2508,11 @@
st->print("valuetype[%d]:{", count);
st->print("%s", count != 0 ? _vk->declared_nonstatic_field_at(0)->type()->name() : "empty");
for (int i = 1; i < count; ++i) {
st->print(", %s", _vk->declared_nonstatic_field_at(i)->type()->name());
}
- st->print("}");
+ st->print("}%s", _larval?":larval":"");
}
#endif
//==============================TypeVect=======================================
// Convenience common pre-built types.
< prev index next >