Skip to content

Commit 908d146

Browse files
committed
Chuck out weird markWord code.
1 parent 1c9ebf7 commit 908d146

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/hotspot/share/oops/markWord.hpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -453,25 +453,10 @@ class markWord {
453453
// Prepare address of oop for placement into mark
454454
inline static markWord encode_pointer_as_mark(void* p) { return from_pointer(p).set_marked(); }
455455

456-
// Recover address of oop from encoded form used in mark
457456
inline void* decode_pointer() const {
458-
// Get the current age and 3 Valhalla bits.
459-
// Note that the larval bit is ignored in this case.
460-
uint n_valhalla = 3;
461-
uintptr_t age = (_value >> age_shift) & age_mask;
462-
uintptr_t valhalla = (_value >> inline_type_shift) & right_n_bits(n_valhalla);
463-
// Use the legacy indices: age = 6, Valhalla = 3.
464-
uint old_age = 6, old_valhalla = 3;
465-
// Swap into the legacy format.
466-
uintptr_t tmp = write_bits(_value, valhalla, old_valhalla, old_valhalla + n_valhalla);
467-
tmp = write_bits(tmp, age, old_age, old_age + age_bits);
468-
// No idea what this achives, but it is needed to work.
469-
uintptr_t static_prototype_value_max = (1 << old_age) - 1;
470-
return (EnableValhalla && tmp < static_prototype_value_max) ? nullptr :
471-
(void*) (clear_lock_bits().value());
457+
return (void*) (clear_lock_bits().value());
472458
}
473459

474-
475460
inline bool is_self_forwarded() const {
476461
NOT_LP64(assert(LockingMode != LM_LEGACY, "incorrect with LM_LEGACY on 32 bit");)
477462
return mask_bits(value(), self_fwd_mask_in_place) != 0;

0 commit comments

Comments
 (0)