hotspot/src/share/vm/ci/ciEnv.cpp
changeset 26944 d515f86283be
parent 26796 666464578742
child 27420 04e6f914cce1
equal deleted inserted replaced
26943:8b8001fb3aa0 26944:d515f86283be
   578   if (cache_index >= 0) {
   578   if (cache_index >= 0) {
   579     assert(index < 0, "only one kind of index at a time");
   579     assert(index < 0, "only one kind of index at a time");
   580     oop obj = cpool->resolved_references()->obj_at(cache_index);
   580     oop obj = cpool->resolved_references()->obj_at(cache_index);
   581     if (obj != NULL) {
   581     if (obj != NULL) {
   582       ciObject* ciobj = get_object(obj);
   582       ciObject* ciobj = get_object(obj);
   583       return ciConstant(T_OBJECT, ciobj);
   583       if (ciobj->is_array()) {
       
   584         return ciConstant(T_ARRAY, ciobj);
       
   585       } else {
       
   586         assert(ciobj->is_instance(), "should be an instance");
       
   587         return ciConstant(T_OBJECT, ciobj);
       
   588       }
   584     }
   589     }
   585     index = cpool->object_to_cp_index(cache_index);
   590     index = cpool->object_to_cp_index(cache_index);
   586   }
   591   }
   587   constantTag tag = cpool->tag_at(index);
   592   constantTag tag = cpool->tag_at(index);
   588   if (tag.is_int()) {
   593   if (tag.is_int()) {
   605         record_out_of_memory_failure();
   610         record_out_of_memory_failure();
   606         return ciConstant();
   611         return ciConstant();
   607       }
   612       }
   608     }
   613     }
   609     ciObject* constant = get_object(string);
   614     ciObject* constant = get_object(string);
   610     assert (constant->is_instance(), "must be an instance, or not? ");
   615     if (constant->is_array()) {
   611     return ciConstant(T_OBJECT, constant);
   616       return ciConstant(T_ARRAY, constant);
       
   617     } else {
       
   618       assert (constant->is_instance(), "must be an instance, or not? ");
       
   619       return ciConstant(T_OBJECT, constant);
       
   620     }
   612   } else if (tag.is_klass() || tag.is_unresolved_klass()) {
   621   } else if (tag.is_klass() || tag.is_unresolved_klass()) {
   613     // 4881222: allow ldc to take a class type
   622     // 4881222: allow ldc to take a class type
   614     ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore_will_link, accessor);
   623     ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore_will_link, accessor);
   615     if (HAS_PENDING_EXCEPTION) {
   624     if (HAS_PENDING_EXCEPTION) {
   616       CLEAR_PENDING_EXCEPTION;
   625       CLEAR_PENDING_EXCEPTION;