Skip to content

Commit

Permalink
Move impl of has_klass_gap() into oop.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
rkennke committed Nov 14, 2024
1 parent 7f7f0df commit 919a32c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/hotspot/share/oops/oop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ class oopDesc {
inline bool mark_must_be_preserved() const;
inline bool mark_must_be_preserved(markWord m) const;

inline static bool has_klass_gap();
inline static bool has_klass_gap() {
return ObjLayout::oop_has_klass_gap();
}

// for code generation
static int mark_offset_in_bytes() { return (int)offset_of(oopDesc, _mark); }
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/oops/oop.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ void oopDesc::release_set_klass(HeapWord* mem, Klass* k) {
}
}

inline bool oopDesc::has_klass_gap() {
return ObjLayout::oop_has_klass_gap();
}

void oopDesc::set_klass_gap(HeapWord* mem, int v) {
assert(has_klass_gap(), "precondition");
*(int*)(((char*)mem) + klass_gap_offset_in_bytes()) = v;
Expand Down

0 comments on commit 919a32c

Please sign in to comment.