src/share/vm/ci/ciTypeFlow.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/ci

src/share/vm/ci/ciTypeFlow.cpp

Print this page
rev 7046 : 8058828: Wrong ciConstant type for arrays from ConstantPool::_resolved_reference
Reviewed-by: ?


 713 void ciTypeFlow::StateVector::do_jsr(ciBytecodeStream* str) {
 714   push(ciReturnAddress::make(str->next_bci()));
 715 }
 716 
 717 // ------------------------------------------------------------------
 718 // ciTypeFlow::StateVector::do_ldc
 719 void ciTypeFlow::StateVector::do_ldc(ciBytecodeStream* str) {
 720   ciConstant con = str->get_constant();
 721   BasicType basic_type = con.basic_type();
 722   if (basic_type == T_ILLEGAL) {
 723     // OutOfMemoryError in the CI while loading constant
 724     push_null();
 725     outer()->record_failure("ldc did not link");
 726     return;
 727   }
 728   if (basic_type == T_OBJECT || basic_type == T_ARRAY) {
 729     ciObject* obj = con.as_object();
 730     if (obj->is_null_object()) {
 731       push_null();
 732     } else {
 733       assert(obj->is_instance(), "must be java_mirror of klass");
 734       push_object(obj->klass());
 735     }
 736   } else {
 737     push_translate(ciType::make(basic_type));
 738   }
 739 }
 740 
 741 // ------------------------------------------------------------------
 742 // ciTypeFlow::StateVector::do_multianewarray
 743 void ciTypeFlow::StateVector::do_multianewarray(ciBytecodeStream* str) {
 744   int dimensions = str->get_dimensions();
 745   bool will_link;
 746   ciArrayKlass* array_klass = str->get_klass(will_link)->as_array_klass();
 747   if (!will_link) {
 748     trap(str, array_klass, str->get_klass_index());
 749   } else {
 750     for (int i = 0; i < dimensions; i++) {
 751       pop_int();
 752     }
 753     push_object(array_klass);




 713 void ciTypeFlow::StateVector::do_jsr(ciBytecodeStream* str) {
 714   push(ciReturnAddress::make(str->next_bci()));
 715 }
 716 
 717 // ------------------------------------------------------------------
 718 // ciTypeFlow::StateVector::do_ldc
 719 void ciTypeFlow::StateVector::do_ldc(ciBytecodeStream* str) {
 720   ciConstant con = str->get_constant();
 721   BasicType basic_type = con.basic_type();
 722   if (basic_type == T_ILLEGAL) {
 723     // OutOfMemoryError in the CI while loading constant
 724     push_null();
 725     outer()->record_failure("ldc did not link");
 726     return;
 727   }
 728   if (basic_type == T_OBJECT || basic_type == T_ARRAY) {
 729     ciObject* obj = con.as_object();
 730     if (obj->is_null_object()) {
 731       push_null();
 732     } else {
 733       assert(obj->is_instance() || obj->is_array(), "must be java_mirror of klass");
 734       push_object(obj->klass());
 735     }
 736   } else {
 737     push_translate(ciType::make(basic_type));
 738   }
 739 }
 740 
 741 // ------------------------------------------------------------------
 742 // ciTypeFlow::StateVector::do_multianewarray
 743 void ciTypeFlow::StateVector::do_multianewarray(ciBytecodeStream* str) {
 744   int dimensions = str->get_dimensions();
 745   bool will_link;
 746   ciArrayKlass* array_klass = str->get_klass(will_link)->as_array_klass();
 747   if (!will_link) {
 748     trap(str, array_klass, str->get_klass_index());
 749   } else {
 750     for (int i = 0; i < dimensions; i++) {
 751       pop_int();
 752     }
 753     push_object(array_klass);


src/share/vm/ci/ciTypeFlow.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File