2632 result = exact_signature_k; |
2632 result = exact_signature_k; |
2633 // Known statically. No need to emit any code: prevent |
2633 // Known statically. No need to emit any code: prevent |
2634 // LIR_Assembler::emit_profile_type() from emitting useless code |
2634 // LIR_Assembler::emit_profile_type() from emitting useless code |
2635 profiled_k = ciTypeEntries::with_status(result, profiled_k); |
2635 profiled_k = ciTypeEntries::with_status(result, profiled_k); |
2636 } |
2636 } |
2637 if (exact_signature_k != NULL && exact_klass != exact_signature_k) { |
2637 // exact_klass and exact_signature_k can be both non NULL but |
2638 assert(exact_klass == NULL, "obj and signature disagree?"); |
2638 // different if exact_klass is loaded after the ciObject for |
|
2639 // exact_signature_k is created. |
|
2640 if (exact_klass == NULL && exact_signature_k != NULL && exact_klass != exact_signature_k) { |
2639 // sometimes the type of the signature is better than the best type |
2641 // sometimes the type of the signature is better than the best type |
2640 // the compiler has |
2642 // the compiler has |
2641 exact_klass = exact_signature_k; |
2643 exact_klass = exact_signature_k; |
2642 } |
2644 } |
2643 if (callee_signature_k != NULL && |
2645 if (callee_signature_k != NULL && |
2644 callee_signature_k != signature_at_call_k) { |
2646 callee_signature_k != signature_at_call_k) { |
2645 ciKlass* improved_klass = callee_signature_k->exact_klass(); |
2647 ciKlass* improved_klass = callee_signature_k->exact_klass(); |
2646 if (improved_klass == NULL) { |
2648 if (improved_klass == NULL) { |
2647 improved_klass = comp->cha_exact_type(callee_signature_k); |
2649 improved_klass = comp->cha_exact_type(callee_signature_k); |
2648 } |
2650 } |
2649 if (improved_klass != NULL && exact_klass != improved_klass) { |
2651 if (exact_klass == NULL && improved_klass != NULL && exact_klass != improved_klass) { |
2650 assert(exact_klass == NULL, "obj and signature disagree?"); |
|
2651 exact_klass = exact_signature_k; |
2652 exact_klass = exact_signature_k; |
2652 } |
2653 } |
2653 } |
2654 } |
2654 do_update = exact_klass == NULL || ciTypeEntries::valid_ciklass(profiled_k) != exact_klass; |
2655 do_update = exact_klass == NULL || ciTypeEntries::valid_ciklass(profiled_k) != exact_klass; |
2655 } |
2656 } |