mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
8035396: Introduce accessor for tmp_oop in frame
Avoid #ifs by introducing the accessor function interpreter_frame_temp_oop_addr(). Reviewed-by: kvn, twisti
This commit is contained in:
parent
6dcf058035
commit
c01a8b9263
5 changed files with 20 additions and 16 deletions
|
@ -237,6 +237,10 @@ inline ConstantPoolCache** frame::interpreter_frame_cpoolcache_addr() const {
|
||||||
inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
|
inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
|
||||||
return (ConstantPoolCache**)sp_addr_at( LcpoolCache->sp_offset_in_saved_window());
|
return (ConstantPoolCache**)sp_addr_at( LcpoolCache->sp_offset_in_saved_window());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline oop* frame::interpreter_frame_temp_oop_addr() const {
|
||||||
|
return (oop *)(fp() + interpreter_frame_oop_temp_offset);
|
||||||
|
}
|
||||||
#endif // CC_INTERP
|
#endif // CC_INTERP
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -247,6 +247,10 @@ inline intptr_t* frame::interpreter_frame_tos_address() const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline oop* frame::interpreter_frame_temp_oop_addr() const {
|
||||||
|
return (oop *)(fp() + interpreter_frame_oop_temp_offset);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CC_INTERP */
|
#endif /* CC_INTERP */
|
||||||
|
|
||||||
inline int frame::pd_oop_map_offset_adjustment() const {
|
inline int frame::pd_oop_map_offset_adjustment() const {
|
||||||
|
|
|
@ -933,20 +933,9 @@ void frame::oops_interpreted_do(OopClosure* f, CLDToOopClosure* cld_f,
|
||||||
cld_f->do_cld(m->method_holder()->class_loader_data());
|
cld_f->do_cld(m->method_holder()->class_loader_data());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(PPC32) || defined(ZERO)
|
if (m->is_native() PPC32_ONLY(&& m->is_static())) {
|
||||||
if (m->is_native()) {
|
f->do_oop(interpreter_frame_temp_oop_addr());
|
||||||
#ifdef CC_INTERP
|
|
||||||
interpreterState istate = get_interpreterState();
|
|
||||||
f->do_oop((oop*)&istate->_oop_temp);
|
|
||||||
#else
|
|
||||||
f->do_oop((oop*)( fp() + interpreter_frame_oop_temp_offset ));
|
|
||||||
#endif /* CC_INTERP */
|
|
||||||
}
|
}
|
||||||
#else // PPC32
|
|
||||||
if (m->is_native() && m->is_static()) {
|
|
||||||
f->do_oop(interpreter_frame_mirror_addr());
|
|
||||||
}
|
|
||||||
#endif // PPC32
|
|
||||||
|
|
||||||
int max_locals = m->is_native() ? m->size_of_parameters() : m->max_locals();
|
int max_locals = m->is_native() ? m->size_of_parameters() : m->max_locals();
|
||||||
|
|
||||||
|
|
|
@ -314,6 +314,9 @@ class frame VALUE_OBJ_CLASS_SPEC {
|
||||||
void interpreter_frame_set_monitor_end(BasicObjectLock* value);
|
void interpreter_frame_set_monitor_end(BasicObjectLock* value);
|
||||||
#endif // CC_INTERP
|
#endif // CC_INTERP
|
||||||
|
|
||||||
|
// Address of the temp oop in the frame. Needed as GC root.
|
||||||
|
oop* interpreter_frame_temp_oop_addr() const;
|
||||||
|
|
||||||
// BasicObjectLocks:
|
// BasicObjectLocks:
|
||||||
//
|
//
|
||||||
// interpreter_frame_monitor_begin is higher in memory than interpreter_frame_monitor_end
|
// interpreter_frame_monitor_begin is higher in memory than interpreter_frame_monitor_end
|
||||||
|
@ -350,9 +353,6 @@ class frame VALUE_OBJ_CLASS_SPEC {
|
||||||
void interpreter_frame_set_method(Method* method);
|
void interpreter_frame_set_method(Method* method);
|
||||||
Method** interpreter_frame_method_addr() const;
|
Method** interpreter_frame_method_addr() const;
|
||||||
ConstantPoolCache** interpreter_frame_cache_addr() const;
|
ConstantPoolCache** interpreter_frame_cache_addr() const;
|
||||||
#ifdef PPC32
|
|
||||||
oop* interpreter_frame_mirror_addr() const;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Entry frames
|
// Entry frames
|
||||||
|
|
|
@ -87,6 +87,13 @@ inline bool frame::is_first_frame() const {
|
||||||
return is_entry_frame() && entry_frame_is_first();
|
return is_entry_frame() && entry_frame_is_first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CC_INTERP
|
||||||
|
inline oop* frame::interpreter_frame_temp_oop_addr() const {
|
||||||
|
interpreterState istate = get_interpreterState();
|
||||||
|
return (oop *)&istate->_oop_temp;
|
||||||
|
}
|
||||||
|
#endif // CC_INTERP
|
||||||
|
|
||||||
// here are the platform-dependent bodies:
|
// here are the platform-dependent bodies:
|
||||||
|
|
||||||
#ifdef TARGET_ARCH_x86
|
#ifdef TARGET_ARCH_x86
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue