8243996: Remove hardcoded field offsets from HotSpot

Reviewed-by: jrose, coleenp, dholmes, fparain
This commit is contained in:
Erik Österlund 2020-05-20 09:31:38 +00:00
parent c3e3459027
commit 6508c5a38d
14 changed files with 109 additions and 114 deletions

View file

@ -39,12 +39,20 @@
# define __ _masm->
void TemplateInterpreter::initialize() {
void TemplateInterpreter::initialize_stub() {
// assertions
assert(_code == NULL, "must only initialize once");
assert((int)Bytecodes::number_of_codes <= (int)DispatchTable::length,
"dispatch table too small");
// allocate interpreter
int code_size = InterpreterCodeSize;
NOT_PRODUCT(code_size *= 4;) // debug uses extra interpreter code space
_code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
"Interpreter");
}
void TemplateInterpreter::initialize_code() {
AbstractInterpreter::initialize();
TemplateTable::initialize();
@ -52,10 +60,6 @@ void TemplateInterpreter::initialize() {
// generate interpreter
{ ResourceMark rm;
TraceTime timer("Interpreter generation", TRACETIME_LOG(Info, startuptime));
int code_size = InterpreterCodeSize;
NOT_PRODUCT(code_size *= 4;) // debug uses extra interpreter code space
_code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
"Interpreter");
TemplateInterpreterGenerator g(_code);
// Free the unused memory not occupied by the interpreter and the stubs
_code->deallocate_unused_tail();