Skip to content

Commit

Permalink
Simplify set last_sp in prepare_freeze_interpreted_top_frame
Browse files Browse the repository at this point in the history
  • Loading branch information
pchilano committed Oct 28, 2024
1 parent c513ae3 commit 7cb4cff
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,9 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) {
}
}

inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) {
inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) {
assert(*f.addr_at(frame::interpreter_frame_last_sp_offset) == 0, "should be null for top frame");
intptr_t* lspp = f.addr_at(frame::interpreter_frame_last_sp_offset);
*lspp = f.unextended_sp() - f.fp();
f.interpreter_frame_set_last_sp(f.unextended_sp());
}

inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, const frame& hf) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/arm/continuationFreezeThaw_arm.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) {
Unimplemented();
}

inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) {
inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) {
Unimplemented();
}

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) {
// nothing to do
}

inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) {
inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) {
// nothing to do
DEBUG_ONLY( intptr_t* lspp = (intptr_t*) &(f.get_ijava_state()->top_frame_sp); )
assert(*lspp == f.unextended_sp() - f.fp(), "should be " INTPTR_FORMAT " usp:" INTPTR_FORMAT " fp:" INTPTR_FORMAT, *lspp, p2i(f.unextended_sp()), p2i(f.fp()));
Expand Down
5 changes: 2 additions & 3 deletions src/hotspot/cpu/riscv/continuationFreezeThaw_riscv.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,9 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) {
}
}

inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) {
inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) {
assert(*f.addr_at(frame::interpreter_frame_last_sp_offset) == 0, "should be null for top frame");
intptr_t* lspp = f.addr_at(frame::interpreter_frame_last_sp_offset);
*lspp = f.unextended_sp() - f.fp();
f.interpreter_frame_set_last_sp(f.unextended_sp());
}

inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, const frame& hf) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) {
Unimplemented();
}

inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) {
inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) {
Unimplemented();
}

Expand Down
5 changes: 2 additions & 3 deletions src/hotspot/cpu/x86/continuationFreezeThaw_x86.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,9 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) {
}
}

inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) {
inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) {
assert(*f.addr_at(frame::interpreter_frame_last_sp_offset) == 0, "should be null for top frame");
intptr_t* lspp = f.addr_at(frame::interpreter_frame_last_sp_offset);
*lspp = f.unextended_sp() - f.fp();
f.interpreter_frame_set_last_sp(f.unextended_sp());
}

inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, const frame& hf) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) {
Unimplemented();
}

inline void FreezeBase::prepare_freeze_interpreted_top_frame(const frame& f) {
inline void FreezeBase::prepare_freeze_interpreted_top_frame(frame& f) {
Unimplemented();
}

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/continuationFreezeThaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ class FreezeBase : public StackObj {
inline void set_top_frame_metadata_pd(const frame& hf);
inline void patch_pd(frame& callee, const frame& caller);
void adjust_interpreted_frame_unextended_sp(frame& f);
static inline void prepare_freeze_interpreted_top_frame(const frame& f);
static inline void prepare_freeze_interpreted_top_frame(frame& f);
static inline void relativize_interpreted_frame_metadata(const frame& f, const frame& hf);

protected:
Expand Down

0 comments on commit 7cb4cff

Please sign in to comment.