mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7022998: JSR 292 recursive method handle calls inline themselves infinitely
Reviewed-by: never, kvn
This commit is contained in:
parent
36303f61b6
commit
f51036e9bc
13 changed files with 203 additions and 173 deletions
|
@ -2479,20 +2479,10 @@ bool AdapterHandlerEntry::compare_code(unsigned char* buffer, int length, int to
|
|||
// java compiled calling convention to the native convention, handlizes
|
||||
// arguments, and transitions to native. On return from the native we transition
|
||||
// back to java blocking if a safepoint is in progress.
|
||||
nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method) {
|
||||
nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method, int compile_id) {
|
||||
ResourceMark rm;
|
||||
nmethod* nm = NULL;
|
||||
|
||||
if (PrintCompilation) {
|
||||
ttyLocker ttyl;
|
||||
tty->print("--- n%s ", (method->is_synchronized() ? "s" : " "));
|
||||
method->print_short_name(tty);
|
||||
if (method->is_static()) {
|
||||
tty->print(" (static)");
|
||||
}
|
||||
tty->cr();
|
||||
}
|
||||
|
||||
assert(method->has_native_function(), "must have something valid to call!");
|
||||
|
||||
{
|
||||
|
@ -2537,6 +2527,7 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method) {
|
|||
// Generate the compiled-to-native wrapper code
|
||||
nm = SharedRuntime::generate_native_wrapper(&_masm,
|
||||
method,
|
||||
compile_id,
|
||||
total_args_passed,
|
||||
comp_args_on_stack,
|
||||
sig_bt,regs,
|
||||
|
@ -2548,6 +2539,10 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method) {
|
|||
|
||||
// Install the generated code.
|
||||
if (nm != NULL) {
|
||||
if (PrintCompilation) {
|
||||
ttyLocker ttyl;
|
||||
CompileTask::print_compilation(tty, nm, method->is_static() ? "(static)" : "");
|
||||
}
|
||||
method->set_code(method, nm);
|
||||
nm->post_compiled_method_load_event();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue