@@ -47,8 +47,8 @@ inline const ImmutableOopMap* ImmutableOopMapPair::get_from(const ImmutableOopMa
47
47
return set->oopmap_at_offset (_oopmap_offset);
48
48
}
49
49
50
- inline bool SkipNullValue::should_skip (oop val) {
51
- return val == (oop) nullptr || CompressedOops::is_base (val);
50
+ inline bool SkipNullValue::should_skip (void * val) {
51
+ return val == nullptr || (UseCompressedOops && CompressedOops::is_base (val) );
52
52
}
53
53
54
54
template <typename OopFnT, typename DerivedOopFnT, typename ValueFilterT>
@@ -84,14 +84,15 @@ void OopMapDo<OopFnT, DerivedOopFnT, ValueFilterT>::iterate_oops_do(const frame
84
84
}
85
85
guarantee (loc != nullptr , " missing saved register" );
86
86
derived_pointer* derived_loc = (derived_pointer*)loc;
87
- oop* base_loc = fr->oopmapreg_to_oop_location (omv.content_reg (), reg_map);
88
- // Ignore nullptr oops and decoded nullptr narrow oops which
87
+ void ** base_loc = (void **) fr->oopmapreg_to_location (omv.content_reg (), reg_map);
88
+
89
+ // Ignore nullptr oops and decoded null narrow oops which
89
90
// equal to CompressedOops::base() when a narrow oop
90
91
// implicit null check is used in compiled code.
91
92
// The narrow_oop_base could be nullptr or be the address
92
93
// of the page below heap depending on compressed oops mode.
93
- if (base_loc != nullptr && *base_loc != (oop) nullptr && ! CompressedOops::is_base (*base_loc)) {
94
- _derived_oop_fn->do_derived_oop (base_loc, derived_loc);
94
+ if (base_loc != nullptr && ! SkipNullValue::should_skip (*base_loc)) {
95
+ _derived_oop_fn->do_derived_oop ((oop*) base_loc, derived_loc);
95
96
}
96
97
}
97
98
}
@@ -102,7 +103,7 @@ void OopMapDo<OopFnT, DerivedOopFnT, ValueFilterT>::iterate_oops_do(const frame
102
103
OopMapValue omv = oms.current ();
103
104
if (omv.type () != OopMapValue::oop_value && omv.type () != OopMapValue::narrowoop_value)
104
105
continue ;
105
- oop* loc = fr->oopmapreg_to_oop_location (omv.reg (),reg_map);
106
+ void ** loc = ( void **) fr->oopmapreg_to_location (omv.reg (),reg_map);
106
107
// It should be an error if no location can be found for a
107
108
// register mentioned as contained an oop of some kind. Maybe
108
109
// this was allowed previously because value_value items might
@@ -122,7 +123,7 @@ void OopMapDo<OopFnT, DerivedOopFnT, ValueFilterT>::iterate_oops_do(const frame
122
123
}
123
124
guarantee (loc != nullptr , " missing saved register" );
124
125
if ( omv.type () == OopMapValue::oop_value ) {
125
- oop val = *loc;
126
+ void * val = *loc;
126
127
if (ValueFilterT::should_skip (val)) { // TODO: UGLY (basically used to decide if we're freezing/thawing continuation)
127
128
// Ignore nullptr oops and decoded nullptr narrow oops which
128
129
// equal to CompressedOops::base() when a narrow oop
@@ -131,7 +132,7 @@ void OopMapDo<OopFnT, DerivedOopFnT, ValueFilterT>::iterate_oops_do(const frame
131
132
// of the page below heap depending on compressed oops mode.
132
133
continue ;
133
134
}
134
- _oop_fn->do_oop (loc);
135
+ _oop_fn->do_oop ((oop*) loc);
135
136
} else if ( omv.type () == OopMapValue::narrowoop_value ) {
136
137
narrowOop *nl = (narrowOop*)loc;
137
138
#ifndef VM_LITTLE_ENDIAN
0 commit comments