8232083: Minimal VM is broken after JDK-8231586

Reviewed-by: dlong
This commit is contained in:
Tom Rodriguez 2019-10-24 22:41:24 -07:00
parent c87a6fc0b3
commit be6a893e1f

View file

@ -308,10 +308,13 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map,
// handle derived pointers first (otherwise base pointer may be // handle derived pointers first (otherwise base pointer may be
// changed before derived pointer offset has been collected) // changed before derived pointer offset has been collected)
OopMapValue omv;
{ {
OopMapStream oms(map); for (OopMapStream oms(map); !oms.is_done(); oms.next()) {
if (!oms.is_done()) { OopMapValue omv = oms.current();
if (omv.type() != OopMapValue::derived_oop_value) {
continue;
}
#ifndef TIERED #ifndef TIERED
COMPILER1_PRESENT(ShouldNotReachHere();) COMPILER1_PRESENT(ShouldNotReachHere();)
#if INCLUDE_JVMCI #if INCLUDE_JVMCI
@ -320,9 +323,6 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map,
} }
#endif #endif
#endif // !TIERED #endif // !TIERED
do {
omv = oms.current();
if (omv.type() == OopMapValue::derived_oop_value) {
oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map); oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
guarantee(loc != NULL, "missing saved register"); guarantee(loc != NULL, "missing saved register");
oop *derived_loc = loc; oop *derived_loc = loc;
@ -335,16 +335,14 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map,
if (base_loc != NULL && *base_loc != NULL && !CompressedOops::is_base(*base_loc)) { if (base_loc != NULL && *base_loc != NULL && !CompressedOops::is_base(*base_loc)) {
derived_oop_fn(base_loc, derived_loc); derived_oop_fn(base_loc, derived_loc);
} }
}
oms.next(); oms.next();
} while (!oms.is_done());
} }
} }
{ {
// We want coop and oop oop_types // We want coop and oop oop_types
for (OopMapStream oms(map); !oms.is_done(); oms.next()) { for (OopMapStream oms(map); !oms.is_done(); oms.next()) {
omv = oms.current(); OopMapValue omv = oms.current();
oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map); oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
// It should be an error if no location can be found for a // It should be an error if no location can be found for a
// register mentioned as contained an oop of some kind. Maybe // register mentioned as contained an oop of some kind. Maybe