8293654: Improve SharedRuntime handling of continuation helper out-arguments
Reviewed-by: dlong, kvn
This commit is contained in:
parent
60f59a4a88
commit
2baf2516e1
src/hotspot/cpu
@ -1126,11 +1126,9 @@ static void gen_continuation_yield(MacroAssembler* masm,
|
||||
const methodHandle& method,
|
||||
const BasicType* sig_bt,
|
||||
const VMRegPair* regs,
|
||||
int& exception_offset,
|
||||
OopMapSet* oop_maps,
|
||||
int& frame_complete,
|
||||
int& stack_slots,
|
||||
int& interpreted_entry_offset,
|
||||
int& compiled_entry_offset) {
|
||||
enum layout {
|
||||
rfp_off1,
|
||||
@ -1263,12 +1261,12 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
VMRegPair* in_regs,
|
||||
BasicType ret_type) {
|
||||
if (method->is_continuation_native_intrinsic()) {
|
||||
int vep_offset = 0;
|
||||
int exception_offset = 0;
|
||||
int frame_complete = 0;
|
||||
int stack_slots = 0;
|
||||
OopMapSet* oop_maps = new OopMapSet();
|
||||
int exception_offset = -1;
|
||||
OopMapSet* oop_maps = new OopMapSet();
|
||||
int frame_complete = -1;
|
||||
int stack_slots = -1;
|
||||
int interpreted_entry_offset = -1;
|
||||
int vep_offset = -1;
|
||||
if (method->is_continuation_enter_intrinsic()) {
|
||||
gen_continuation_enter(masm,
|
||||
method,
|
||||
@ -1285,15 +1283,27 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
method,
|
||||
in_sig_bt,
|
||||
in_regs,
|
||||
exception_offset,
|
||||
oop_maps,
|
||||
frame_complete,
|
||||
stack_slots,
|
||||
interpreted_entry_offset,
|
||||
vep_offset);
|
||||
} else {
|
||||
guarantee(false, "Unknown Continuation native intrinsic");
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
if (method->is_continuation_enter_intrinsic()) {
|
||||
assert(interpreted_entry_offset != -1, "Must be set");
|
||||
assert(exception_offset != -1, "Must be set");
|
||||
} else {
|
||||
assert(interpreted_entry_offset == -1, "Must be unset");
|
||||
assert(exception_offset == -1, "Must be unset");
|
||||
}
|
||||
assert(frame_complete != -1, "Must be set");
|
||||
assert(stack_slots != -1, "Must be set");
|
||||
assert(vep_offset != -1, "Must be set");
|
||||
#endif
|
||||
|
||||
__ flush();
|
||||
nmethod* nm = nmethod::new_native_nmethod(method,
|
||||
compile_id,
|
||||
|
@ -1447,11 +1447,9 @@ static void gen_continuation_enter(MacroAssembler* masm,
|
||||
|
||||
static void gen_continuation_yield(MacroAssembler* masm,
|
||||
const VMRegPair* regs,
|
||||
int& exception_offset,
|
||||
OopMapSet* oop_maps,
|
||||
int& frame_complete,
|
||||
int& stack_slots,
|
||||
int& interpreted_entry_offset,
|
||||
int& compiled_entry_offset) {
|
||||
enum layout {
|
||||
rbp_off,
|
||||
@ -1585,12 +1583,12 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
VMRegPair* in_regs,
|
||||
BasicType ret_type) {
|
||||
if (method->is_continuation_native_intrinsic()) {
|
||||
int vep_offset = 0;
|
||||
int exception_offset = 0;
|
||||
int frame_complete = 0;
|
||||
int stack_slots = 0;
|
||||
int exception_offset = -1;
|
||||
OopMapSet* oop_maps = new OopMapSet();
|
||||
int frame_complete = -1;
|
||||
int stack_slots = -1;
|
||||
int interpreted_entry_offset = -1;
|
||||
int vep_offset = -1;
|
||||
if (method->is_continuation_enter_intrinsic()) {
|
||||
gen_continuation_enter(masm,
|
||||
in_regs,
|
||||
@ -1603,15 +1601,27 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
} else if (method->is_continuation_yield_intrinsic()) {
|
||||
gen_continuation_yield(masm,
|
||||
in_regs,
|
||||
exception_offset,
|
||||
oop_maps,
|
||||
frame_complete,
|
||||
stack_slots,
|
||||
interpreted_entry_offset,
|
||||
vep_offset);
|
||||
} else {
|
||||
guarantee(false, "Unknown Continuation native intrinsic");
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
if (method->is_continuation_enter_intrinsic()) {
|
||||
assert(interpreted_entry_offset != -1, "Must be set");
|
||||
assert(exception_offset != -1, "Must be set");
|
||||
} else {
|
||||
assert(interpreted_entry_offset == -1, "Must be unset");
|
||||
assert(exception_offset == -1, "Must be unset");
|
||||
}
|
||||
assert(frame_complete != -1, "Must be set");
|
||||
assert(stack_slots != -1, "Must be set");
|
||||
assert(vep_offset != -1, "Must be set");
|
||||
#endif
|
||||
|
||||
__ flush();
|
||||
nmethod* nm = nmethod::new_native_nmethod(method,
|
||||
compile_id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user