--- old/src/hotspot/share/opto/type.cpp 2019-01-21 14:08:29.375753923 +0100 +++ new/src/hotspot/share/opto/type.cpp 2019-01-21 14:08:29.192754074 +0100 @@ -2403,8 +2403,8 @@ //==============================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------------------------------------------- @@ -2452,6 +2452,15 @@ 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; } @@ -2471,7 +2480,7 @@ // 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------------------------------------------- @@ -2501,7 +2510,7 @@ 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