< prev index next > src/hotspot/share/runtime/stackValue.cpp
Print this page
#endif
class RegisterMap;
class SmallRegisterMap;
- template StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMap* reg_map, ScopeValue* sv);
- template StackValue* StackValue::create_stack_value(const frame* fr, const SmallRegisterMap* reg_map, ScopeValue* sv);
-
- template<typename RegisterMapT>
- StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMapT* reg_map, ScopeValue* sv) {
- return create_stack_value(sv, stack_value_address(fr, reg_map, sv), reg_map);
- }
static oop oop_from_oop_location(stackChunkOop chunk, void* addr) {
if (addr == nullptr) {
return nullptr;
}
p2i(addr), chunk != nullptr, chunk != nullptr && chunk->has_bitmap() && UseCompressedOops);
Handle h(Thread::current(), val); // Wrap a handle around the oop
return new StackValue(h);
}
template<typename RegisterMapT>
! StackValue* StackValue::create_stack_value(ScopeValue* sv, address value_addr, const RegisterMapT* reg_map) {
stackChunkOop chunk = reg_map->stack_chunk()();
if (sv->is_location()) {
// Stack or register value
Location loc = ((LocationValue *)sv)->location();
p2i(addr), chunk != nullptr, chunk != nullptr && chunk->has_bitmap() && UseCompressedOops);
Handle h(Thread::current(), val); // Wrap a handle around the oop
return new StackValue(h);
}
+
+ template StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMap* reg_map, ScopeValue* sv);
+ template StackValue* StackValue::create_stack_value(const frame* fr, const SmallRegisterMap* reg_map, ScopeValue* sv);
+
template<typename RegisterMapT>
! StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMapT* reg_map, ScopeValue* sv) {
+ address value_addr = stack_value_address(fr, reg_map, sv);
stackChunkOop chunk = reg_map->stack_chunk()();
if (sv->is_location()) {
// Stack or register value
Location loc = ((LocationValue *)sv)->location();
return new StackValue(value.p);
#endif
} else if (sv->is_object()) { // Scalar replaced object in compiled frame
ObjectValue* ov = (ObjectValue *)sv;
Handle hdl = ov->value();
! return new StackValue(hdl, hdl.is_null() && ov->is_scalar_replaced() ? 1 : 0);
} else if (sv->is_marker()) {
// Should never need to directly construct a marker.
ShouldNotReachHere();
}
// Unknown ScopeValue type
return new StackValue(value.p);
#endif
} else if (sv->is_object()) { // Scalar replaced object in compiled frame
ObjectValue* ov = (ObjectValue *)sv;
Handle hdl = ov->value();
! bool scalar_replaced = hdl.is_null() && ov->is_scalar_replaced();
+ if (ov->maybe_null()) {
+ // Don't treat inline type as scalar replaced if it is null
+ jint is_init = StackValue::create_stack_value(fr, reg_map, ov->is_init())->get_jint();
+ scalar_replaced &= (is_init != 0);
+ }
+ return new StackValue(hdl, scalar_replaced ? 1 : 0);
} else if (sv->is_marker()) {
// Should never need to directly construct a marker.
ShouldNotReachHere();
}
// Unknown ScopeValue type
< prev index next >