mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8199809: Don't include frame.inline.hpp and other.inline.hpp from .hpp files
Remove frame.inline.hpp,etc from header files and adjust transitive includes. Reviewed-by: stefank, stuefe
This commit is contained in:
parent
b15a3ff611
commit
221d0f4c54
179 changed files with 816 additions and 583 deletions
|
@ -53,6 +53,7 @@
|
|||
#include "runtime/compilationPolicy.hpp"
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/fieldDescriptor.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
#include "runtime/interfaceSupport.inline.hpp"
|
||||
|
@ -84,6 +85,58 @@ class UnlockFlagSaver {
|
|||
}
|
||||
};
|
||||
|
||||
// Helper class to access current interpreter state
|
||||
class LastFrameAccessor : public StackObj {
|
||||
frame _last_frame;
|
||||
public:
|
||||
LastFrameAccessor(JavaThread* thread) {
|
||||
assert(thread == Thread::current(), "sanity");
|
||||
_last_frame = thread->last_frame();
|
||||
}
|
||||
bool is_interpreted_frame() const { return _last_frame.is_interpreted_frame(); }
|
||||
Method* method() const { return _last_frame.interpreter_frame_method(); }
|
||||
address bcp() const { return _last_frame.interpreter_frame_bcp(); }
|
||||
int bci() const { return _last_frame.interpreter_frame_bci(); }
|
||||
address mdp() const { return _last_frame.interpreter_frame_mdp(); }
|
||||
|
||||
void set_bcp(address bcp) { _last_frame.interpreter_frame_set_bcp(bcp); }
|
||||
void set_mdp(address dp) { _last_frame.interpreter_frame_set_mdp(dp); }
|
||||
|
||||
// pass method to avoid calling unsafe bcp_to_method (partial fix 4926272)
|
||||
Bytecodes::Code code() const { return Bytecodes::code_at(method(), bcp()); }
|
||||
|
||||
Bytecode bytecode() const { return Bytecode(method(), bcp()); }
|
||||
int get_index_u1(Bytecodes::Code bc) const { return bytecode().get_index_u1(bc); }
|
||||
int get_index_u2(Bytecodes::Code bc) const { return bytecode().get_index_u2(bc); }
|
||||
int get_index_u2_cpcache(Bytecodes::Code bc) const
|
||||
{ return bytecode().get_index_u2_cpcache(bc); }
|
||||
int get_index_u4(Bytecodes::Code bc) const { return bytecode().get_index_u4(bc); }
|
||||
int number_of_dimensions() const { return bcp()[3]; }
|
||||
ConstantPoolCacheEntry* cache_entry_at(int i) const
|
||||
{ return method()->constants()->cache()->entry_at(i); }
|
||||
ConstantPoolCacheEntry* cache_entry() const { return cache_entry_at(Bytes::get_native_u2(bcp() + 1)); }
|
||||
|
||||
oop callee_receiver(Symbol* signature) {
|
||||
return _last_frame.interpreter_callee_receiver(signature);
|
||||
}
|
||||
BasicObjectLock* monitor_begin() const {
|
||||
return _last_frame.interpreter_frame_monitor_begin();
|
||||
}
|
||||
BasicObjectLock* monitor_end() const {
|
||||
return _last_frame.interpreter_frame_monitor_end();
|
||||
}
|
||||
BasicObjectLock* next_monitor(BasicObjectLock* current) const {
|
||||
return _last_frame.next_monitor_in_interpreter_frame(current);
|
||||
}
|
||||
|
||||
frame& get_frame() { return _last_frame; }
|
||||
};
|
||||
|
||||
|
||||
bool InterpreterRuntime::is_breakpoint(JavaThread *thread) {
|
||||
return Bytecodes::code_or_bp_at(LastFrameAccessor(thread).bcp()) == Bytecodes::_breakpoint;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
// State accessors
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue