1.1 --- a/src/share/vm/opto/type.cpp Thu Sep 10 10:36:24 2009 -0700 1.2 +++ b/src/share/vm/opto/type.cpp Thu Sep 10 18:18:06 2009 -0700 1.3 @@ -2236,12 +2236,12 @@ 1.4 1.5 //------------------------------make------------------------------------------- 1.6 const TypeOopPtr *TypeOopPtr::make(PTR ptr, 1.7 - int offset) { 1.8 + int offset, int instance_id) { 1.9 assert(ptr != Constant, "no constant generic pointers"); 1.10 ciKlass* k = ciKlassKlass::make(); 1.11 bool xk = false; 1.12 ciObject* o = NULL; 1.13 - return (TypeOopPtr*)(new TypeOopPtr(OopPtr, ptr, k, xk, o, offset, InstanceBot))->hashcons(); 1.14 + return (TypeOopPtr*)(new TypeOopPtr(OopPtr, ptr, k, xk, o, offset, instance_id))->hashcons(); 1.15 } 1.16 1.17 1.18 @@ -2330,7 +2330,8 @@ 1.19 1.20 case OopPtr: { // Meeting to other OopPtrs 1.21 const TypeOopPtr *tp = t->is_oopptr(); 1.22 - return make( meet_ptr(tp->ptr()), meet_offset(tp->offset()) ); 1.23 + int instance_id = meet_instance_id(tp->instance_id()); 1.24 + return make( meet_ptr(tp->ptr()), meet_offset(tp->offset()), instance_id ); 1.25 } 1.26 1.27 case InstPtr: // For these, flip the call around to cut down 1.28 @@ -2801,7 +2802,7 @@ 1.29 1.30 case OopPtr: { // Meeting to OopPtrs 1.31 // Found a OopPtr type vs self-InstPtr type 1.32 - const TypePtr *tp = t->is_oopptr(); 1.33 + const TypeOopPtr *tp = t->is_oopptr(); 1.34 int offset = meet_offset(tp->offset()); 1.35 PTR ptr = meet_ptr(tp->ptr()); 1.36 switch (tp->ptr()) { 1.37 @@ -2812,8 +2813,10 @@ 1.38 (ptr == Constant ? const_oop() : NULL), offset, instance_id); 1.39 } 1.40 case NotNull: 1.41 - case BotPTR: 1.42 - return TypeOopPtr::make(ptr, offset); 1.43 + case BotPTR: { 1.44 + int instance_id = meet_instance_id(tp->instance_id()); 1.45 + return TypeOopPtr::make(ptr, offset, instance_id); 1.46 + } 1.47 default: typerr(t); 1.48 } 1.49 } 1.50 @@ -3259,7 +3262,7 @@ 1.51 1.52 case OopPtr: { // Meeting to OopPtrs 1.53 // Found a OopPtr type vs self-AryPtr type 1.54 - const TypePtr *tp = t->is_oopptr(); 1.55 + const TypeOopPtr *tp = t->is_oopptr(); 1.56 int offset = meet_offset(tp->offset()); 1.57 PTR ptr = meet_ptr(tp->ptr()); 1.58 switch (tp->ptr()) { 1.59 @@ -3270,8 +3273,10 @@ 1.60 _ary, _klass, _klass_is_exact, offset, instance_id); 1.61 } 1.62 case BotPTR: 1.63 - case NotNull: 1.64 - return TypeOopPtr::make(ptr, offset); 1.65 + case NotNull: { 1.66 + int instance_id = meet_instance_id(tp->instance_id()); 1.67 + return TypeOopPtr::make(ptr, offset, instance_id); 1.68 + } 1.69 default: ShouldNotReachHere(); 1.70 } 1.71 }