src/share/vm/runtime/javaCalls.cpp

Print this page




 355   // Since the call stub sets up like the interpreter we call the from_interpreted_entry
 356   // so we can go compiled via a i2c. Otherwise initial entry method will always
 357   // run interpreted.
 358   address entry_point = method->from_interpreted_entry();
 359   if (JvmtiExport::can_post_interpreter_events() && thread->is_interp_only_mode()) {
 360     entry_point = method->interpreter_entry();
 361   }
 362 
 363   // Figure out if the result value is an oop or not (Note: This is a different value
 364   // than result_type. result_type will be T_INT of oops. (it is about size)
 365   BasicType result_type = runtime_type_from(result);
 366   bool oop_result_flag = (result->get_type() == T_OBJECT || result->get_type() == T_ARRAY);
 367 
 368   // NOTE: if we move the computation of the result_val_address inside
 369   // the call to call_stub, the optimizer produces wrong code.
 370   intptr_t* result_val_address = (intptr_t*)(result->get_value_addr());
 371 
 372   // Find receiver
 373   Handle receiver = (!method->is_static()) ? args->receiver() : Handle();
 374 
 375   // When we reenter Java, we need to reenable the yellow zone which
 376   // might already be disabled when we are in VM.
 377   if (thread->stack_yellow_zone_disabled()) {
 378     thread->reguard_stack();
 379   }
 380 
 381   // Check that there are shadow pages available before changing thread state
 382   // to Java
 383   if (!os::stack_shadow_pages_available(THREAD, method)) {
 384     // Throw stack overflow exception with preinitialized exception.
 385     Exceptions::throw_stack_overflow_exception(THREAD, __FILE__, __LINE__, method);
 386     return;
 387   } else {
 388     // Touch pages checked if the OS needs them to be touched to be mapped.
 389     os::bang_stack_shadow_pages();
 390   }
 391 
 392 #if INCLUDE_JVMCI
 393   if (alternative_target != NULL) {
 394     if (alternative_target->is_alive()) {
 395       thread->set_jvmci_alternate_call_target(alternative_target->verified_entry_point());
 396       entry_point = method->adapter()->get_i2c_entry();
 397     } else {




 355   // Since the call stub sets up like the interpreter we call the from_interpreted_entry
 356   // so we can go compiled via a i2c. Otherwise initial entry method will always
 357   // run interpreted.
 358   address entry_point = method->from_interpreted_entry();
 359   if (JvmtiExport::can_post_interpreter_events() && thread->is_interp_only_mode()) {
 360     entry_point = method->interpreter_entry();
 361   }
 362 
 363   // Figure out if the result value is an oop or not (Note: This is a different value
 364   // than result_type. result_type will be T_INT of oops. (it is about size)
 365   BasicType result_type = runtime_type_from(result);
 366   bool oop_result_flag = (result->get_type() == T_OBJECT || result->get_type() == T_ARRAY);
 367 
 368   // NOTE: if we move the computation of the result_val_address inside
 369   // the call to call_stub, the optimizer produces wrong code.
 370   intptr_t* result_val_address = (intptr_t*)(result->get_value_addr());
 371 
 372   // Find receiver
 373   Handle receiver = (!method->is_static()) ? args->receiver() : Handle();
 374 
 375   // When we reenter Java, we need to reenable the reserved/yellow zone which
 376   // might already be disabled when we are in VM.
 377   if (!thread->stack_guards_enabled()) {
 378     thread->reguard_stack();
 379   }
 380 
 381   // Check that there are shadow pages available before changing thread state
 382   // to Java
 383   if (!os::stack_shadow_pages_available(THREAD, method)) {
 384     // Throw stack overflow exception with preinitialized exception.
 385     Exceptions::throw_stack_overflow_exception(THREAD, __FILE__, __LINE__, method);
 386     return;
 387   } else {
 388     // Touch pages checked if the OS needs them to be touched to be mapped.
 389     os::bang_stack_shadow_pages();
 390   }
 391 
 392 #if INCLUDE_JVMCI
 393   if (alternative_target != NULL) {
 394     if (alternative_target->is_alive()) {
 395       thread->set_jvmci_alternate_call_target(alternative_target->verified_entry_point());
 396       entry_point = method->adapter()->get_i2c_entry();
 397     } else {