368 // the call to call_stub, the optimizer produces wrong code.
369 intptr_t* result_val_address = (intptr_t*)(result->get_value_addr());
370
371 // Find receiver
372 Handle receiver = (!method->is_static()) ? args->receiver() : Handle();
373
374 // When we reenter Java, we need to reenable the reserved/yellow zone which
375 // might already be disabled when we are in VM.
376 if (!thread->stack_guards_enabled()) {
377 thread->reguard_stack();
378 }
379
380 // Check that there are shadow pages available before changing thread state
381 // to Java
382 if (!os::stack_shadow_pages_available(THREAD, method)) {
383 // Throw stack overflow exception with preinitialized exception.
384 Exceptions::throw_stack_overflow_exception(THREAD, __FILE__, __LINE__, method);
385 return;
386 } else {
387 // Touch pages checked if the OS needs them to be touched to be mapped.
388 os::bang_stack_shadow_pages();
389 }
390
391 #if INCLUDE_JVMCI
392 if (alternative_target != NULL) {
393 if (alternative_target->is_alive()) {
394 thread->set_jvmci_alternate_call_target(alternative_target->verified_entry_point());
395 entry_point = method->adapter()->get_i2c_entry();
396 } else {
397 THROW(vmSymbols::jdk_vm_ci_code_InvalidInstalledCodeException());
398 }
399 }
400 #endif
401
402 // do call
403 { JavaCallWrapper link(method, receiver, result, CHECK);
404 { HandleMark hm(thread); // HandleMark used by HandleMarkCleaner
405
406 StubRoutines::call_stub()(
407 (address)&link,
408 // (intptr_t*)&(result->_value), // see NOTE above (compiler problem)
|
368 // the call to call_stub, the optimizer produces wrong code.
369 intptr_t* result_val_address = (intptr_t*)(result->get_value_addr());
370
371 // Find receiver
372 Handle receiver = (!method->is_static()) ? args->receiver() : Handle();
373
374 // When we reenter Java, we need to reenable the reserved/yellow zone which
375 // might already be disabled when we are in VM.
376 if (!thread->stack_guards_enabled()) {
377 thread->reguard_stack();
378 }
379
380 // Check that there are shadow pages available before changing thread state
381 // to Java
382 if (!os::stack_shadow_pages_available(THREAD, method)) {
383 // Throw stack overflow exception with preinitialized exception.
384 Exceptions::throw_stack_overflow_exception(THREAD, __FILE__, __LINE__, method);
385 return;
386 } else {
387 // Touch pages checked if the OS needs them to be touched to be mapped.
388 os::map_stack_shadow_pages();
389 }
390
391 #if INCLUDE_JVMCI
392 if (alternative_target != NULL) {
393 if (alternative_target->is_alive()) {
394 thread->set_jvmci_alternate_call_target(alternative_target->verified_entry_point());
395 entry_point = method->adapter()->get_i2c_entry();
396 } else {
397 THROW(vmSymbols::jdk_vm_ci_code_InvalidInstalledCodeException());
398 }
399 }
400 #endif
401
402 // do call
403 { JavaCallWrapper link(method, receiver, result, CHECK);
404 { HandleMark hm(thread); // HandleMark used by HandleMarkCleaner
405
406 StubRoutines::call_stub()(
407 (address)&link,
408 // (intptr_t*)&(result->_value), // see NOTE above (compiler problem)
|