src/share/vm/ci/ciEnv.cpp

changeset 7288
9dc314de223d
parent 7183
dd89808e49ba
child 7535
7ae4e26cb1e0
child 9858
b985cbb00e68
     1.1 --- a/src/share/vm/ci/ciEnv.cpp	Wed Oct 01 12:34:45 2014 -0700
     1.2 +++ b/src/share/vm/ci/ciEnv.cpp	Wed Oct 01 12:34:38 2014 -0700
     1.3 @@ -559,7 +559,12 @@
     1.4      oop obj = cpool->resolved_references()->obj_at(cache_index);
     1.5      if (obj != NULL) {
     1.6        ciObject* ciobj = get_object(obj);
     1.7 -      return ciConstant(T_OBJECT, ciobj);
     1.8 +      if (ciobj->is_array()) {
     1.9 +        return ciConstant(T_ARRAY, ciobj);
    1.10 +      } else {
    1.11 +        assert(ciobj->is_instance(), "should be an instance");
    1.12 +        return ciConstant(T_OBJECT, ciobj);
    1.13 +      }
    1.14      }
    1.15      index = cpool->object_to_cp_index(cache_index);
    1.16    }
    1.17 @@ -586,8 +591,12 @@
    1.18        }
    1.19      }
    1.20      ciObject* constant = get_object(string);
    1.21 -    assert (constant->is_instance(), "must be an instance, or not? ");
    1.22 -    return ciConstant(T_OBJECT, constant);
    1.23 +    if (constant->is_array()) {
    1.24 +      return ciConstant(T_ARRAY, constant);
    1.25 +    } else {
    1.26 +      assert (constant->is_instance(), "must be an instance, or not? ");
    1.27 +      return ciConstant(T_OBJECT, constant);
    1.28 +    }
    1.29    } else if (tag.is_klass() || tag.is_unresolved_klass()) {
    1.30      // 4881222: allow ldc to take a class type
    1.31      ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore_will_link, accessor);

mercurial