src/share/vm/oops/arrayOop.hpp

changeset 464
d5fc211aea19
parent 435
a61af66fc99e
child 548
ba764ed4b6f2
     1.1 --- a/src/share/vm/oops/arrayOop.hpp	Fri Feb 22 17:55:13 2008 -0800
     1.2 +++ b/src/share/vm/oops/arrayOop.hpp	Mon Feb 25 15:05:44 2008 -0800
     1.3 @@ -58,11 +58,11 @@
     1.4    // alignments.  It gets the scale from the type2aelembytes array.
     1.5    static int32_t max_array_length(BasicType type) {
     1.6      assert(type >= 0 && type < T_CONFLICT, "wrong type");
     1.7 -    assert(type2aelembytes[type] != 0, "wrong type");
     1.8 +    assert(type2aelembytes(type) != 0, "wrong type");
     1.9      // We use max_jint, since object_size is internally represented by an 'int'
    1.10      // This gives us an upper bound of max_jint words for the size of the oop.
    1.11      int32_t max_words = (max_jint - header_size(type) - 2);
    1.12 -    int elembytes = (type == T_OBJECT) ? T_OBJECT_aelem_bytes : type2aelembytes[type];
    1.13 +    int elembytes = (type == T_OBJECT) ? T_OBJECT_aelem_bytes : type2aelembytes(type);
    1.14      jlong len = ((jlong)max_words * HeapWordSize) / elembytes;
    1.15      return (len > max_jint) ? max_jint : (int32_t)len;
    1.16    }

mercurial