author | coleenp |
Wed, 24 Jul 2019 10:22:11 -0400 | |
changeset 57511 | 00ae3b739184 |
parent 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
35498
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50728
diff
changeset
|
2 |
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. |
35498
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
4 |
* |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
8 |
* |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
13 |
* accompanied this code). |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
14 |
* |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
18 |
* |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
21 |
* questions. |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
22 |
* |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
23 |
*/ |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
24 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50728
diff
changeset
|
25 |
#ifndef SHARE_OOPS_TYPEARRAYOOP_INLINE_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50728
diff
changeset
|
26 |
#define SHARE_OOPS_TYPEARRAYOOP_INLINE_HPP |
35498
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
27 |
|
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
28 |
#include "oops/access.inline.hpp" |
35498
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
29 |
#include "oops/oop.inline.hpp" |
49041
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
30 |
#include "oops/arrayOop.inline.hpp" |
35498
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
31 |
#include "oops/typeArrayOop.hpp" |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
32 |
|
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
33 |
int typeArrayOopDesc::object_size() { |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
34 |
TypeArrayKlass* tk = TypeArrayKlass::cast(klass()); |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
35 |
return object_size(tk->layout_helper(), length()); |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
36 |
} |
392b50de06c6
8146401: Clean up oop.hpp: add inline directives and fix header files
goetz
parents:
diff
changeset
|
37 |
|
49041
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
38 |
inline jchar* typeArrayOopDesc::char_base() const { return (jchar*) base(T_CHAR); } |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
39 |
inline jboolean* typeArrayOopDesc::bool_base() const { return (jboolean*)base(T_BOOLEAN); } |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
40 |
inline jbyte* typeArrayOopDesc::byte_base() const { return (jbyte*) base(T_BYTE); } |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
41 |
inline jint* typeArrayOopDesc::int_base() const { return (jint*) base(T_INT); } |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
42 |
inline jlong* typeArrayOopDesc::long_base() const { return (jlong*) base(T_LONG); } |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
43 |
inline jshort* typeArrayOopDesc::short_base() const { return (jshort*) base(T_SHORT); } |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
44 |
inline jfloat* typeArrayOopDesc::float_base() const { return (jfloat*) base(T_FLOAT); } |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
45 |
inline jdouble* typeArrayOopDesc::double_base() const { return (jdouble*) base(T_DOUBLE); } |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
46 |
|
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
47 |
inline jbyte* typeArrayOopDesc::byte_at_addr(int which) const { |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
48 |
assert(is_within_bounds(which), "index %d out of bounds %d", which, length()); |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
49 |
return &byte_base()[which]; |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
50 |
} |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
51 |
|
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
52 |
inline jboolean* typeArrayOopDesc::bool_at_addr(int which) const { |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
53 |
assert(is_within_bounds(which), "index %d out of bounds %d", which, length()); |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
54 |
return &bool_base()[which]; |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
55 |
} |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
56 |
|
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
57 |
inline jchar* typeArrayOopDesc::char_at_addr(int which) const { |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
58 |
assert(is_within_bounds(which), "index %d out of bounds %d", which, length()); |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
59 |
return &char_base()[which]; |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
60 |
} |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
61 |
|
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
62 |
inline jint* typeArrayOopDesc::int_at_addr(int which) const { |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
63 |
assert(is_within_bounds(which), "index %d out of bounds %d", which, length()); |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
64 |
return &int_base()[which]; |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
65 |
} |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
66 |
|
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
67 |
inline jshort* typeArrayOopDesc::short_at_addr(int which) const { |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
68 |
assert(is_within_bounds(which), "index %d out of bounds %d", which, length()); |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
69 |
return &short_base()[which]; |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
70 |
} |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
71 |
|
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
72 |
inline jushort* typeArrayOopDesc::ushort_at_addr(int which) const { // for field descriptor arrays |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
73 |
assert(is_within_bounds(which), "index %d out of bounds %d", which, length()); |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
74 |
return (jushort*) &short_base()[which]; |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
75 |
} |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
76 |
|
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
77 |
inline jlong* typeArrayOopDesc::long_at_addr(int which) const { |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
78 |
assert(is_within_bounds(which), "index %d out of bounds %d", which, length()); |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
79 |
return &long_base()[which]; |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
80 |
} |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
81 |
|
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
82 |
inline jfloat* typeArrayOopDesc::float_at_addr(int which) const { |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
83 |
assert(is_within_bounds(which), "index %d out of bounds %d", which, length()); |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
84 |
return &float_base()[which]; |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
85 |
} |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
86 |
|
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
87 |
inline jdouble* typeArrayOopDesc::double_at_addr(int which) const { |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
88 |
assert(is_within_bounds(which), "index %d out of bounds %d", which, length()); |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
89 |
return &double_base()[which]; |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
90 |
} |
44122f767467
8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents:
49036
diff
changeset
|
91 |
|
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
92 |
inline jbyte typeArrayOopDesc::byte_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
93 |
ptrdiff_t offset = element_offset<jbyte>(which); |
50728 | 94 |
return HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
95 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
96 |
inline void typeArrayOopDesc::byte_at_put(int which, jbyte contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
97 |
ptrdiff_t offset = element_offset<jbyte>(which); |
50728 | 98 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
99 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
100 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
101 |
inline jboolean typeArrayOopDesc::bool_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
102 |
ptrdiff_t offset = element_offset<jboolean>(which); |
50728 | 103 |
return HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
104 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
105 |
inline void typeArrayOopDesc::bool_at_put(int which, jboolean contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
106 |
ptrdiff_t offset = element_offset<jboolean>(which); |
50728 | 107 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, jboolean(contents & 1)); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
108 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
109 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
110 |
inline jchar typeArrayOopDesc::char_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
111 |
ptrdiff_t offset = element_offset<jchar>(which); |
50728 | 112 |
return HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
113 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
114 |
inline void typeArrayOopDesc::char_at_put(int which, jchar contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
115 |
ptrdiff_t offset = element_offset<jchar>(which); |
50728 | 116 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
117 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
118 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
119 |
inline jint typeArrayOopDesc::int_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
120 |
ptrdiff_t offset = element_offset<jint>(which); |
50728 | 121 |
return HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
122 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
123 |
inline void typeArrayOopDesc::int_at_put(int which, jint contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
124 |
ptrdiff_t offset = element_offset<jint>(which); |
50728 | 125 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
126 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
127 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
128 |
inline jshort typeArrayOopDesc::short_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
129 |
ptrdiff_t offset = element_offset<jshort>(which); |
50728 | 130 |
return HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
131 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
132 |
inline void typeArrayOopDesc::short_at_put(int which, jshort contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
133 |
ptrdiff_t offset = element_offset<jshort>(which); |
50728 | 134 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
135 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
136 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
137 |
inline jushort typeArrayOopDesc::ushort_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
138 |
ptrdiff_t offset = element_offset<jushort>(which); |
50728 | 139 |
return HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
140 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
141 |
inline void typeArrayOopDesc::ushort_at_put(int which, jushort contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
142 |
ptrdiff_t offset = element_offset<jushort>(which); |
50728 | 143 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
144 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
145 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
146 |
inline jlong typeArrayOopDesc::long_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
147 |
ptrdiff_t offset = element_offset<jlong>(which); |
50728 | 148 |
return HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
149 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
150 |
inline void typeArrayOopDesc::long_at_put(int which, jlong contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
151 |
ptrdiff_t offset = element_offset<jlong>(which); |
50728 | 152 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
153 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
154 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
155 |
inline jfloat typeArrayOopDesc::float_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
156 |
ptrdiff_t offset = element_offset<jfloat>(which); |
50728 | 157 |
return HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
158 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
159 |
inline void typeArrayOopDesc::float_at_put(int which, jfloat contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
160 |
ptrdiff_t offset = element_offset<jfloat>(which); |
50728 | 161 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
162 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
163 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
164 |
inline jdouble typeArrayOopDesc::double_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
165 |
ptrdiff_t offset = element_offset<jdouble>(which); |
50728 | 166 |
return HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
167 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
168 |
inline void typeArrayOopDesc::double_at_put(int which, jdouble contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
169 |
ptrdiff_t offset = element_offset<jdouble>(which); |
50728 | 170 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
171 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
172 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
173 |
inline jbyte typeArrayOopDesc::byte_at_acquire(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
174 |
ptrdiff_t offset = element_offset<jbyte>(which); |
50728 | 175 |
return HeapAccess<MO_ACQUIRE | IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
176 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
177 |
inline void typeArrayOopDesc::release_byte_at_put(int which, jbyte contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
178 |
ptrdiff_t offset = element_offset<jbyte>(which); |
50728 | 179 |
HeapAccess<MO_RELEASE | IS_ARRAY>::store_at(as_oop(), offset, contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
180 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
181 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
182 |
// Java thinks Symbol arrays are just arrays of either long or int, since |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
183 |
// there doesn't seem to be T_ADDRESS, so this is a bit of unfortunate |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
184 |
// casting |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
185 |
#ifdef _LP64 |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
186 |
inline Symbol* typeArrayOopDesc::symbol_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
187 |
ptrdiff_t offset = element_offset<jlong>(which); |
50728 | 188 |
return (Symbol*)(jlong) HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
189 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
190 |
inline void typeArrayOopDesc::symbol_at_put(int which, Symbol* contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
191 |
ptrdiff_t offset = element_offset<jlong>(which); |
50728 | 192 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, (jlong)contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
193 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
194 |
#else |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
195 |
inline Symbol* typeArrayOopDesc::symbol_at(int which) const { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
196 |
ptrdiff_t offset = element_offset<jint>(which); |
50728 | 197 |
return (Symbol*)(jint) HeapAccess<IS_ARRAY>::load_at(as_oop(), offset); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
198 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
199 |
inline void typeArrayOopDesc::symbol_at_put(int which, Symbol* contents) { |
50389
7e8c0409a747
8198285: More consistent Access API for arraycopy
rkennke
parents:
49055
diff
changeset
|
200 |
ptrdiff_t offset = element_offset<jint>(which); |
50728 | 201 |
HeapAccess<IS_ARRAY>::store_at(as_oop(), offset, (jint)contents); |
49036
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
202 |
} |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
203 |
#endif // _LP64 |
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
204 |
|
bc92debe57e4
8197999: Accessors in typeArrayOopDesc should use new Access API
rkennke
parents:
47216
diff
changeset
|
205 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50728
diff
changeset
|
206 |
#endif // SHARE_OOPS_TYPEARRAYOOP_INLINE_HPP |