< prev index next >

src/hotspot/share/runtime/stackValue.cpp

Print this page




 116       if (UseShenandoahGC) {
 117         val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val);
 118       }
 119 #endif
 120       Handle h(Thread::current(), val); // Wrap a handle around the oop
 121       return new StackValue(h);
 122     }
 123 #endif
 124     case Location::oop: {
 125       oop val = *(oop *)value_addr;
 126 #ifdef _LP64
 127       if (CompressedOops::is_base(val)) {
 128          // Compiled code may produce decoded oop = narrow_oop_base
 129          // when a narrow oop implicit null check is used.
 130          // The narrow_oop_base could be NULL or be the address
 131          // of the page below heap. Use NULL value for both cases.
 132          val = (oop)NULL;
 133       }
 134 #endif
 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()) {




 116       if (UseShenandoahGC) {
 117         val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val);
 118       }
 119 #endif
 120       Handle h(Thread::current(), val); // Wrap a handle around the oop
 121       return new StackValue(h);
 122     }
 123 #endif
 124     case Location::oop: {
 125       oop val = *(oop *)value_addr;
 126 #ifdef _LP64
 127       if (CompressedOops::is_base(val)) {
 128          // Compiled code may produce decoded oop = narrow_oop_base
 129          // when a narrow oop implicit null check is used.
 130          // The narrow_oop_base could be NULL or be the address
 131          // of the page below heap. Use NULL value for both cases.
 132          val = (oop)NULL;
 133       }
 134 #endif
 135       // Deoptimization must make sure all oops have passed load barriers
 136 #if INCLUDE_ZGC
 137       if (UseZGC) {
 138         val = ZBarrier::load_barrier_on_oop_field_preloaded((oop*)value_addr, val);
 139       }
 140 #endif
 141 #if INCLUDE_SHENANDOAHGC
 142       if (UseShenandoahGC) {
 143         val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val);
 144       }
 145 #endif

 146       Handle h(Thread::current(), val); // Wrap a handle around the oop
 147       return new StackValue(h);
 148     }
 149     case Location::addr: {
 150       ShouldNotReachHere(); // both C1 and C2 now inline jsrs
 151     }
 152     case Location::normal: {
 153       // Just copy all other bits straight through
 154       union { intptr_t p; jint ji;} value;
 155       value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF);
 156       value.ji = *(jint*)value_addr;
 157       return new StackValue(value.p);
 158     }
 159     case Location::invalid:
 160       return new StackValue();
 161     default:
 162       ShouldNotReachHere();
 163     }
 164 
 165   } else if (sv->is_constant_int()) {


< prev index next >