Mercurial > hg > graal-compiler
diff src/share/vm/oops/arrayOop.hpp @ 29:d5fc211aea19
6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM
Summary: T_ADDRESS size is defined as 'int' size (4 bytes) but C2 use it for raw pointers and as memory type for StoreP and LoadP nodes.
Reviewed-by: jrose
author | kvn |
---|---|
date | Mon, 25 Feb 2008 15:05:44 -0800 |
parents | a61af66fc99e |
children | ba764ed4b6f2 |
line wrap: on
line diff
--- a/src/share/vm/oops/arrayOop.hpp Fri Feb 22 17:55:13 2008 -0800 +++ b/src/share/vm/oops/arrayOop.hpp Mon Feb 25 15:05:44 2008 -0800 @@ -58,11 +58,11 @@ // alignments. It gets the scale from the type2aelembytes array. static int32_t max_array_length(BasicType type) { assert(type >= 0 && type < T_CONFLICT, "wrong type"); - assert(type2aelembytes[type] != 0, "wrong type"); + assert(type2aelembytes(type) != 0, "wrong type"); // We use max_jint, since object_size is internally represented by an 'int' // This gives us an upper bound of max_jint words for the size of the oop. int32_t max_words = (max_jint - header_size(type) - 2); - int elembytes = (type == T_OBJECT) ? T_OBJECT_aelem_bytes : type2aelembytes[type]; + int elembytes = (type == T_OBJECT) ? T_OBJECT_aelem_bytes : type2aelembytes(type); jlong len = ((jlong)max_words * HeapWordSize) / elembytes; return (len > max_jint) ? max_jint : (int32_t)len; }