comparison src/share/vm/oops/typeArrayOop.hpp @ 20804:7848fc12602b

Merge with jdk8u40-b25
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 07 Apr 2015 14:58:49 +0200
parents 52b4284cb496 e4bd8244c085
children
comparison
equal deleted inserted replaced
20184:84105dcdb05b 20804:7848fc12602b
25 #ifndef SHARE_VM_OOPS_TYPEARRAYOOP_HPP 25 #ifndef SHARE_VM_OOPS_TYPEARRAYOOP_HPP
26 #define SHARE_VM_OOPS_TYPEARRAYOOP_HPP 26 #define SHARE_VM_OOPS_TYPEARRAYOOP_HPP
27 27
28 #include "oops/arrayOop.hpp" 28 #include "oops/arrayOop.hpp"
29 #include "oops/typeArrayKlass.hpp" 29 #include "oops/typeArrayKlass.hpp"
30 #ifdef TARGET_OS_ARCH_linux_x86 30 #include "runtime/orderAccess.inline.hpp"
31 # include "orderAccess_linux_x86.inline.hpp"
32 #endif
33 #ifdef TARGET_OS_ARCH_linux_sparc
34 # include "orderAccess_linux_sparc.inline.hpp"
35 #endif
36 #ifdef TARGET_OS_ARCH_linux_zero
37 # include "orderAccess_linux_zero.inline.hpp"
38 #endif
39 #ifdef TARGET_OS_ARCH_solaris_x86
40 # include "orderAccess_solaris_x86.inline.hpp"
41 #endif
42 #ifdef TARGET_OS_ARCH_solaris_sparc
43 # include "orderAccess_solaris_sparc.inline.hpp"
44 #endif
45 #ifdef TARGET_OS_ARCH_windows_x86
46 # include "orderAccess_windows_x86.inline.hpp"
47 #endif
48 #ifdef TARGET_OS_ARCH_linux_arm
49 # include "orderAccess_linux_arm.inline.hpp"
50 #endif
51 #ifdef TARGET_OS_ARCH_linux_ppc
52 # include "orderAccess_linux_ppc.inline.hpp"
53 #endif
54 #ifdef TARGET_OS_ARCH_aix_ppc
55 # include "orderAccess_aix_ppc.inline.hpp"
56 #endif
57 #ifdef TARGET_OS_ARCH_bsd_x86
58 # include "orderAccess_bsd_x86.inline.hpp"
59 #endif
60 #ifdef TARGET_OS_ARCH_bsd_zero
61 # include "orderAccess_bsd_zero.inline.hpp"
62 #endif
63 31
64 // A typeArrayOop is an array containing basic types (non oop elements). 32 // A typeArrayOop is an array containing basic types (non oop elements).
65 // It is used for arrays of {characters, singles, doubles, bytes, shorts, integers, longs} 33 // It is used for arrays of {characters, singles, doubles, bytes, shorts, integers, longs}
66 #include <limits.h> 34 #include <limits.h>
67 35
180 int instance_header_size = Klass::layout_helper_header_size(lh); 148 int instance_header_size = Klass::layout_helper_header_size(lh);
181 int element_shift = Klass::layout_helper_log2_element_size(lh); 149 int element_shift = Klass::layout_helper_log2_element_size(lh);
182 DEBUG_ONLY(BasicType etype = Klass::layout_helper_element_type(lh)); 150 DEBUG_ONLY(BasicType etype = Klass::layout_helper_element_type(lh));
183 assert(length <= arrayOopDesc::max_array_length(etype), "no overflow"); 151 assert(length <= arrayOopDesc::max_array_length(etype), "no overflow");
184 152
185 julong size_in_bytes = length; 153 julong size_in_bytes = (juint)length;
186 size_in_bytes <<= element_shift; 154 size_in_bytes <<= element_shift;
187 size_in_bytes += instance_header_size; 155 size_in_bytes += instance_header_size;
188 julong size_in_words = ((size_in_bytes + (HeapWordSize-1)) >> LogHeapWordSize); 156 julong size_in_words = ((size_in_bytes + (HeapWordSize-1)) >> LogHeapWordSize);
189 assert(size_in_words <= (julong)max_jint, "no overflow"); 157 assert(size_in_words <= (julong)max_jint, "no overflow");
190 158