338 // Ignore call if method is empty
339 if (method->is_empty_method()) {
340 assert(result->get_type() == T_VOID, "an empty method must return a void value");
341 return;
342 }
343
344
345 #ifdef ASSERT
346 { klassOop holder = method->method_holder();
347 // A klass might not be initialized since JavaCall's might be used during the executing of
348 // the <clinit>. For example, a Thread.start might start executing on an object that is
349 // not fully initialized! (bad Java programming style)
350 assert(instanceKlass::cast(holder)->is_linked(), "rewritting must have taken place");
351 }
352 #endif
353
354
355 assert(!thread->is_Compiler_thread(), "cannot compile from the compiler");
356 if (CompilationPolicy::must_be_compiled(method)) {
357 CompileBroker::compile_method(method, InvocationEntryBci,
358 CompLevel_initial_compile,
359 methodHandle(), 0, "must_be_compiled", CHECK);
360 }
361
362 // Since the call stub sets up like the interpreter we call the from_interpreted_entry
363 // so we can go compiled via a i2c. Otherwise initial entry method will always
364 // run interpreted.
365 address entry_point = method->from_interpreted_entry();
366 if (JvmtiExport::can_post_interpreter_events() && thread->is_interp_only_mode()) {
367 entry_point = method->interpreter_entry();
368 }
369
370 // Figure out if the result value is an oop or not (Note: This is a different value
371 // than result_type. result_type will be T_INT of oops. (it is about size)
372 BasicType result_type = runtime_type_from(result);
373 bool oop_result_flag = (result->get_type() == T_OBJECT || result->get_type() == T_ARRAY);
374
375 // NOTE: if we move the computation of the result_val_address inside
376 // the call to call_stub, the optimizer produces wrong code.
377 intptr_t* result_val_address = (intptr_t*)(result->get_value_addr());
378
|
338 // Ignore call if method is empty
339 if (method->is_empty_method()) {
340 assert(result->get_type() == T_VOID, "an empty method must return a void value");
341 return;
342 }
343
344
345 #ifdef ASSERT
346 { klassOop holder = method->method_holder();
347 // A klass might not be initialized since JavaCall's might be used during the executing of
348 // the <clinit>. For example, a Thread.start might start executing on an object that is
349 // not fully initialized! (bad Java programming style)
350 assert(instanceKlass::cast(holder)->is_linked(), "rewritting must have taken place");
351 }
352 #endif
353
354
355 assert(!thread->is_Compiler_thread(), "cannot compile from the compiler");
356 if (CompilationPolicy::must_be_compiled(method)) {
357 CompileBroker::compile_method(method, InvocationEntryBci,
358 CompilationPolicy::policy()->initial_compile_level(),
359 methodHandle(), 0, "must_be_compiled", CHECK);
360 }
361
362 // Since the call stub sets up like the interpreter we call the from_interpreted_entry
363 // so we can go compiled via a i2c. Otherwise initial entry method will always
364 // run interpreted.
365 address entry_point = method->from_interpreted_entry();
366 if (JvmtiExport::can_post_interpreter_events() && thread->is_interp_only_mode()) {
367 entry_point = method->interpreter_entry();
368 }
369
370 // Figure out if the result value is an oop or not (Note: This is a different value
371 // than result_type. result_type will be T_INT of oops. (it is about size)
372 BasicType result_type = runtime_type_from(result);
373 bool oop_result_flag = (result->get_type() == T_OBJECT || result->get_type() == T_ARRAY);
374
375 // NOTE: if we move the computation of the result_val_address inside
376 // the call to call_stub, the optimizer produces wrong code.
377 intptr_t* result_val_address = (intptr_t*)(result->get_value_addr());
378
|