equal
deleted
inserted
replaced
825 } |
825 } |
826 |
826 |
827 for_each_local_value(existing_state, index, existing_value) { |
827 for_each_local_value(existing_state, index, existing_value) { |
828 Value new_value = new_state->local_at(index); |
828 Value new_value = new_state->local_at(index); |
829 if (new_value == NULL || new_value->type()->tag() != existing_value->type()->tag()) { |
829 if (new_value == NULL || new_value->type()->tag() != existing_value->type()->tag()) { |
830 // The old code invalidated the phi function here |
830 Phi* existing_phi = existing_value->as_Phi(); |
831 // Because dead locals are replaced with NULL, this is a very rare case now, so simply bail out |
831 if (existing_phi == NULL) { |
832 return false; // BAILOUT in caller |
832 return false; // BAILOUT in caller |
|
833 } |
|
834 // Invalidate the phi function here. This case is very rare except for |
|
835 // JVMTI capability "can_access_local_variables". |
|
836 // In really rare cases we will bail out in LIRGenerator::move_to_phi. |
|
837 existing_phi->make_illegal(); |
|
838 existing_state->invalidate_local(index); |
|
839 TRACE_PHI(tty->print_cr("invalidating local %d because of type mismatch", index)); |
833 } |
840 } |
834 } |
841 } |
835 |
842 |
836 #ifdef ASSERT |
843 #ifdef ASSERT |
837 // check that all necessary phi functions are present |
844 // check that all necessary phi functions are present |