Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/arrayOop.hpp @ 344:6aae2f9d0294
Merge
author | ysr |
---|---|
date | Thu, 12 Jun 2008 13:50:55 -0700 |
parents | 437d03ea40b1 |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
342:37f87013dfd8 | 344:6aae2f9d0294 |
---|---|
39 // Interpreter/Compiler offsets | 39 // Interpreter/Compiler offsets |
40 | 40 |
41 // Header size computation. | 41 // Header size computation. |
42 // The header is considered the oop part of this type plus the length. | 42 // The header is considered the oop part of this type plus the length. |
43 // Returns the aligned header_size_in_bytes. This is not equivalent to | 43 // Returns the aligned header_size_in_bytes. This is not equivalent to |
44 // sizeof(arrayOopDesc) which should not appear in the code, except here. | 44 // sizeof(arrayOopDesc) which should not appear in the code. |
45 static int header_size_in_bytes() { | 45 static int header_size_in_bytes() { |
46 size_t hs = UseCompressedOops ? | 46 size_t hs = align_size_up(length_offset_in_bytes() + sizeof(int), |
47 sizeof(arrayOopDesc) : | 47 HeapWordSize); |
48 align_size_up(sizeof(arrayOopDesc) + sizeof(int), HeapWordSize); | |
49 #ifdef ASSERT | 48 #ifdef ASSERT |
50 // make sure it isn't called before UseCompressedOops is initialized. | 49 // make sure it isn't called before UseCompressedOops is initialized. |
51 static size_t arrayoopdesc_hs = 0; | 50 static size_t arrayoopdesc_hs = 0; |
52 if (arrayoopdesc_hs == 0) arrayoopdesc_hs = hs; | 51 if (arrayoopdesc_hs == 0) arrayoopdesc_hs = hs; |
53 assert(arrayoopdesc_hs == hs, "header size can't change"); | 52 assert(arrayoopdesc_hs == hs, "header size can't change"); |