< prev index next >

src/hotspot/share/runtime/stackValue.cpp

Print this page
@@ -185,12 +185,19 @@
      value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF);
      value.jl = ((ConstantLongValue *)sv)->value();
      return new StackValue(value.p);
  #endif
    } else if (sv->is_object()) { // Scalar replaced object in compiled frame
-     Handle ov = ((ObjectValue *)sv)->value();
-     return new StackValue(ov, (ov.is_null()) ? 1 : 0);
+     ObjectValue* ov = ((ObjectValue *)sv);
+     bool scalar_replaced = ov->value().is_null();
+     if (ov->maybe_null()) {
+       // Don't treat inline type as scalar replaced if it is null
+       intptr_t is_init_value = StackValue::create_stack_value(fr, reg_map, ov->is_init())->get_int();
+       jint is_init = (jint)*((jint*)&is_init_value);
+       scalar_replaced &= (is_init != 0);
+     }
+     return new StackValue(ov->value(), scalar_replaced ? 1 : 0);
    } else if (sv->is_marker()) {
      // Should never need to directly construct a marker.
      ShouldNotReachHere();
    }
    // Unknown ScopeValue type
< prev index next >