Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
/ jdk13u-dev Public archive

Commit be68489

Browse files
Olga MikhaltsovaYuri Nesterenko
Olga Mikhaltsova
authored and
Yuri Nesterenko
committed
8232083: Minimal VM is broken after JDK-8231586
Backport-of: be6a893
1 parent 40e0519 commit be68489

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

src/hotspot/share/compiler/oopMap.cpp

+20-22
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,13 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map,
308308

309309
// handle derived pointers first (otherwise base pointer may be
310310
// changed before derived pointer offset has been collected)
311-
OopMapValue omv;
312311
{
313-
OopMapStream oms(map);
314-
if (!oms.is_done()) {
312+
for (OopMapStream oms(map); !oms.is_done(); oms.next()) {
313+
OopMapValue omv = oms.current();
314+
if (omv.type() != OopMapValue::derived_oop_value) {
315+
continue;
316+
}
317+
315318
#ifndef TIERED
316319
COMPILER1_PRESENT(ShouldNotReachHere();)
317320
#if INCLUDE_JVMCI
@@ -320,31 +323,26 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map,
320323
}
321324
#endif
322325
#endif // !TIERED
323-
do {
324-
omv = oms.current();
325-
if (omv.type() == OopMapValue::derived_oop_value) {
326-
oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
327-
guarantee(loc != NULL, "missing saved register");
328-
oop *derived_loc = loc;
329-
oop *base_loc = fr->oopmapreg_to_location(omv.content_reg(), reg_map);
330-
// Ignore NULL oops and decoded NULL narrow oops which
331-
// equal to CompressedOops::base() when a narrow oop
332-
// implicit null check is used in compiled code.
333-
// The narrow_oop_base could be NULL or be the address
334-
// of the page below heap depending on compressed oops mode.
335-
if (base_loc != NULL && *base_loc != NULL && !CompressedOops::is_base(*base_loc)) {
336-
derived_oop_fn(base_loc, derived_loc);
337-
}
338-
}
339-
oms.next();
340-
} while (!oms.is_done());
326+
oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
327+
guarantee(loc != NULL, "missing saved register");
328+
oop *derived_loc = loc;
329+
oop *base_loc = fr->oopmapreg_to_location(omv.content_reg(), reg_map);
330+
// Ignore NULL oops and decoded NULL narrow oops which
331+
// equal to CompressedOops::base() when a narrow oop
332+
// implicit null check is used in compiled code.
333+
// The narrow_oop_base could be NULL or be the address
334+
// of the page below heap depending on compressed oops mode.
335+
if (base_loc != NULL && *base_loc != NULL && !CompressedOops::is_base(*base_loc)) {
336+
derived_oop_fn(base_loc, derived_loc);
337+
}
338+
oms.next();
341339
}
342340
}
343341

344342
{
345343
// We want coop and oop oop_types
346344
for (OopMapStream oms(map); !oms.is_done(); oms.next()) {
347-
omv = oms.current();
345+
OopMapValue omv = oms.current();
348346
oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
349347
// It should be an error if no location can be found for a
350348
// register mentioned as contained an oop of some kind. Maybe

0 commit comments

Comments
 (0)