< prev index next >

src/hotspot/share/runtime/stackValue.cpp

Print this page




 135       // Deoptimization must make sure all oops have passed load barriers
 136 #if INCLUDE_SHENANDOAHGC
 137       if (UseShenandoahGC) {
 138         val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val);
 139       }
 140 #endif
 141       assert(oopDesc::is_oop_or_null(val, false), "bad oop found");
 142       Handle h(Thread::current(), val); // Wrap a handle around the oop
 143       return new StackValue(h);
 144     }
 145     case Location::addr: {
 146       ShouldNotReachHere(); // both C1 and C2 now inline jsrs
 147     }
 148     case Location::normal: {
 149       // Just copy all other bits straight through
 150       union { intptr_t p; jint ji;} value;
 151       value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF);
 152       value.ji = *(jint*)value_addr;
 153       return new StackValue(value.p);
 154     }
 155     case Location::invalid:
 156       return new StackValue();




 157     default:
 158       ShouldNotReachHere();
 159     }
 160 
 161   } else if (sv->is_constant_int()) {
 162     // Constant int: treat same as register int.
 163     union { intptr_t p; jint ji;} value;
 164     value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF);
 165     value.ji = (jint)((ConstantIntValue*)sv)->value();
 166     return new StackValue(value.p);
 167   } else if (sv->is_constant_oop()) {
 168     // constant oop
 169     return new StackValue(sv->as_ConstantOopReadValue()->value());
 170 #ifdef _LP64
 171   } else if (sv->is_constant_double()) {
 172     // Constant double in a single stack slot
 173     union { intptr_t p; double d; } value;
 174     value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF);
 175     value.d = ((ConstantDoubleValue *)sv)->value();
 176     return new StackValue(value.p);




 135       // Deoptimization must make sure all oops have passed load barriers
 136 #if INCLUDE_SHENANDOAHGC
 137       if (UseShenandoahGC) {
 138         val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val);
 139       }
 140 #endif
 141       assert(oopDesc::is_oop_or_null(val, false), "bad oop found");
 142       Handle h(Thread::current(), val); // Wrap a handle around the oop
 143       return new StackValue(h);
 144     }
 145     case Location::addr: {
 146       ShouldNotReachHere(); // both C1 and C2 now inline jsrs
 147     }
 148     case Location::normal: {
 149       // Just copy all other bits straight through
 150       union { intptr_t p; jint ji;} value;
 151       value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF);
 152       value.ji = *(jint*)value_addr;
 153       return new StackValue(value.p);
 154     }
 155     case Location::invalid: {
 156       return new StackValue();
 157     }
 158     case Location::vector: {
 159       ShouldNotReachHere(); // should be handled by Deoptimization::realloc_objects()
 160     }
 161     default:
 162       ShouldNotReachHere();
 163     }
 164 
 165   } else if (sv->is_constant_int()) {
 166     // Constant int: treat same as register int.
 167     union { intptr_t p; jint ji;} value;
 168     value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF);
 169     value.ji = (jint)((ConstantIntValue*)sv)->value();
 170     return new StackValue(value.p);
 171   } else if (sv->is_constant_oop()) {
 172     // constant oop
 173     return new StackValue(sv->as_ConstantOopReadValue()->value());
 174 #ifdef _LP64
 175   } else if (sv->is_constant_double()) {
 176     // Constant double in a single stack slot
 177     union { intptr_t p; double d; } value;
 178     value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF);
 179     value.d = ((ConstantDoubleValue *)sv)->value();
 180     return new StackValue(value.p);


< prev index next >