# HG changeset patch # User roland # Date 1346794075 -7200 # Node ID 6c79c797ca4c1d53629fd12f2edf84dfb7cb060d # Parent df5705977fc5aaebd5af7cbdc55e33c87ada51d9 7184649: NPG: Implement another MetdataPtr case Summary: xmeet when both inputs are MetadataPtr. Reviewed-by: kvn diff -r df5705977fc5 -r 6c79c797ca4c hotspot/src/share/vm/opto/type.cpp --- a/hotspot/src/share/vm/opto/type.cpp Tue Sep 04 13:01:03 2012 +0200 +++ b/hotspot/src/share/vm/opto/type.cpp Tue Sep 04 23:27:55 2012 +0200 @@ -3913,10 +3913,25 @@ case AryPtr: return TypePtr::BOTTOM; // Oop meet raw is not well defined - case MetadataPtr: - ShouldNotReachHere(); + case MetadataPtr: { + const TypeMetadataPtr *tp = t->is_metadataptr(); + int offset = meet_offset(tp->offset()); + PTR tptr = tp->ptr(); + PTR ptr = meet_ptr(tptr); + ciMetadata* md = (tptr == TopPTR) ? metadata() : tp->metadata(); + if (tptr == TopPTR || _ptr == TopPTR || + metadata()->equals(tp->metadata())) { + return make(ptr, md, offset); + } + // metadata is different + if( ptr == Constant ) { // Cannot be equal constants, so... + if( tptr == Constant && _ptr != Constant) return t; + if( _ptr == Constant && tptr != Constant) return this; + ptr = NotNull; // Fall down in lattice + } + return make(ptr, NULL, offset); break; - + } } // End of switch return this; // Return the double constant }