author | psandoz |
Wed, 13 Apr 2016 15:05:48 +0200 | |
changeset 37343 | 35a2231828a7 |
parent 36934 | 590fc47a0aeb |
child 37719 | add11bc0e6e2 |
child 38355 | 674cfd9b90cf |
permissions | -rw-r--r-- |
36934 | 1 |
/* |
2 |
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
26 |
* @run testng/othervm -Diters=20000 VarHandleTestMethodHandleAccessLong |
|
27 |
*/ |
|
28 |
||
29 |
import org.testng.annotations.BeforeClass; |
|
30 |
import org.testng.annotations.DataProvider; |
|
31 |
import org.testng.annotations.Test; |
|
32 |
||
33 |
import java.lang.invoke.MethodHandles; |
|
34 |
import java.lang.invoke.VarHandle; |
|
35 |
import java.util.ArrayList; |
|
36 |
import java.util.Arrays; |
|
37 |
import java.util.List; |
|
38 |
||
39 |
import static org.testng.Assert.*; |
|
40 |
||
41 |
public class VarHandleTestMethodHandleAccessLong extends VarHandleBaseTest { |
|
42 |
static final long static_final_v = 1L; |
|
43 |
||
44 |
static long static_v; |
|
45 |
||
46 |
final long final_v = 1L; |
|
47 |
||
48 |
long v; |
|
49 |
||
50 |
VarHandle vhFinalField; |
|
51 |
||
52 |
VarHandle vhField; |
|
53 |
||
54 |
VarHandle vhStaticField; |
|
55 |
||
56 |
VarHandle vhStaticFinalField; |
|
57 |
||
58 |
VarHandle vhArray; |
|
59 |
||
60 |
@BeforeClass |
|
61 |
public void setup() throws Exception { |
|
62 |
vhFinalField = MethodHandles.lookup().findVarHandle( |
|
63 |
VarHandleTestMethodHandleAccessLong.class, "final_v", long.class); |
|
64 |
||
65 |
vhField = MethodHandles.lookup().findVarHandle( |
|
66 |
VarHandleTestMethodHandleAccessLong.class, "v", long.class); |
|
67 |
||
68 |
vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle( |
|
69 |
VarHandleTestMethodHandleAccessLong.class, "static_final_v", long.class); |
|
70 |
||
71 |
vhStaticField = MethodHandles.lookup().findStaticVarHandle( |
|
72 |
VarHandleTestMethodHandleAccessLong.class, "static_v", long.class); |
|
73 |
||
74 |
vhArray = MethodHandles.arrayElementVarHandle(long[].class); |
|
75 |
} |
|
76 |
||
77 |
||
78 |
@DataProvider |
|
79 |
public Object[][] accessTestCaseProvider() throws Exception { |
|
80 |
List<AccessTestCase<?>> cases = new ArrayList<>(); |
|
81 |
||
82 |
for (VarHandleToMethodHandle f : VarHandleToMethodHandle.values()) { |
|
83 |
cases.add(new MethodHandleAccessTestCase("Instance field", |
|
84 |
vhField, f, hs -> testInstanceField(this, hs))); |
|
85 |
cases.add(new MethodHandleAccessTestCase("Instance field unsupported", |
|
86 |
vhField, f, hs -> testInstanceFieldUnsupported(this, hs), |
|
87 |
false)); |
|
88 |
||
89 |
cases.add(new MethodHandleAccessTestCase("Static field", |
|
90 |
vhStaticField, f, VarHandleTestMethodHandleAccessLong::testStaticField)); |
|
91 |
cases.add(new MethodHandleAccessTestCase("Static field unsupported", |
|
92 |
vhStaticField, f, VarHandleTestMethodHandleAccessLong::testStaticFieldUnsupported, |
|
93 |
false)); |
|
94 |
||
95 |
cases.add(new MethodHandleAccessTestCase("Array", |
|
96 |
vhArray, f, VarHandleTestMethodHandleAccessLong::testArray)); |
|
97 |
cases.add(new MethodHandleAccessTestCase("Array unsupported", |
|
98 |
vhArray, f, VarHandleTestMethodHandleAccessLong::testArrayUnsupported, |
|
99 |
false)); |
|
100 |
cases.add(new MethodHandleAccessTestCase("Array index out of bounds", |
|
101 |
vhArray, f, VarHandleTestMethodHandleAccessLong::testArrayIndexOutOfBounds, |
|
102 |
false)); |
|
103 |
} |
|
104 |
||
105 |
// Work around issue with jtreg summary reporting which truncates |
|
106 |
// the String result of Object.toString to 30 characters, hence |
|
107 |
// the first dummy argument |
|
108 |
return cases.stream().map(tc -> new Object[]{tc.toString(), tc}).toArray(Object[][]::new); |
|
109 |
} |
|
110 |
||
111 |
@Test(dataProvider = "accessTestCaseProvider") |
|
112 |
public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable { |
|
113 |
T t = atc.get(); |
|
114 |
int iters = atc.requiresLoop() ? ITERS : 1; |
|
115 |
for (int c = 0; c < iters; c++) { |
|
116 |
atc.testAccess(t); |
|
117 |
} |
|
118 |
} |
|
119 |
||
120 |
||
121 |
static void testInstanceField(VarHandleTestMethodHandleAccessLong recv, Handles hs) throws Throwable { |
|
122 |
// Plain |
|
123 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
124 |
hs.get(TestAccessMode.SET).invokeExact(recv, 1L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
125 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 126 |
assertEquals(x, 1L, "set long value"); |
127 |
} |
|
128 |
||
129 |
||
130 |
// Volatile |
|
131 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
132 |
hs.get(TestAccessMode.SET_VOLATILE).invokeExact(recv, 2L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
133 |
long x = (long) hs.get(TestAccessMode.GET_VOLATILE).invokeExact(recv); |
36934 | 134 |
assertEquals(x, 2L, "setVolatile long value"); |
135 |
} |
|
136 |
||
137 |
// Lazy |
|
138 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
139 |
hs.get(TestAccessMode.SET_RELEASE).invokeExact(recv, 1L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
140 |
long x = (long) hs.get(TestAccessMode.GET_ACQUIRE).invokeExact(recv); |
36934 | 141 |
assertEquals(x, 1L, "setRelease long value"); |
142 |
} |
|
143 |
||
144 |
// Opaque |
|
145 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
146 |
hs.get(TestAccessMode.SET_OPAQUE).invokeExact(recv, 2L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
147 |
long x = (long) hs.get(TestAccessMode.GET_OPAQUE).invokeExact(recv); |
36934 | 148 |
assertEquals(x, 2L, "setOpaque long value"); |
149 |
} |
|
150 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
151 |
hs.get(TestAccessMode.SET).invokeExact(recv, 1L); |
36934 | 152 |
|
153 |
// Compare |
|
154 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
155 |
boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(recv, 1L, 2L); |
36934 | 156 |
assertEquals(r, true, "success compareAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
157 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 158 |
assertEquals(x, 2L, "success compareAndSet long value"); |
159 |
} |
|
160 |
||
161 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
162 |
boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(recv, 1L, 3L); |
36934 | 163 |
assertEquals(r, false, "failing compareAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
164 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 165 |
assertEquals(x, 2L, "failing compareAndSet long value"); |
166 |
} |
|
167 |
||
168 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
169 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(recv, 2L, 1L); |
36934 | 170 |
assertEquals(r, 2L, "success compareAndExchangeVolatile long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
171 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 172 |
assertEquals(x, 1L, "success compareAndExchangeVolatile long value"); |
173 |
} |
|
174 |
||
175 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
176 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(recv, 2L, 3L); |
36934 | 177 |
assertEquals(r, 1L, "failing compareAndExchangeVolatile long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
178 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 179 |
assertEquals(x, 1L, "failing compareAndExchangeVolatile long value"); |
180 |
} |
|
181 |
||
182 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
183 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(recv, 1L, 2L); |
36934 | 184 |
assertEquals(r, 1L, "success compareAndExchangeAcquire long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
185 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 186 |
assertEquals(x, 2L, "success compareAndExchangeAcquire long value"); |
187 |
} |
|
188 |
||
189 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
190 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(recv, 1L, 3L); |
36934 | 191 |
assertEquals(r, 2L, "failing compareAndExchangeAcquire long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
192 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 193 |
assertEquals(x, 2L, "failing compareAndExchangeAcquire long value"); |
194 |
} |
|
195 |
||
196 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
197 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(recv, 2L, 1L); |
36934 | 198 |
assertEquals(r, 2L, "success compareAndExchangeRelease long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
199 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 200 |
assertEquals(x, 1L, "success compareAndExchangeRelease long value"); |
201 |
} |
|
202 |
||
203 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
204 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(recv, 2L, 3L); |
36934 | 205 |
assertEquals(r, 1L, "failing compareAndExchangeRelease long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
206 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 207 |
assertEquals(x, 1L, "failing compareAndExchangeRelease long value"); |
208 |
} |
|
209 |
||
210 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
211 |
boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 1L, 2L); |
36934 | 212 |
assertEquals(r, true, "weakCompareAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
213 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 214 |
assertEquals(x, 2L, "weakCompareAndSet long value"); |
215 |
} |
|
216 |
||
217 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
218 |
boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(recv, 2L, 1L); |
36934 | 219 |
assertEquals(r, true, "weakCompareAndSetAcquire long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
220 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 221 |
assertEquals(x, 1L, "weakCompareAndSetAcquire long"); |
222 |
} |
|
223 |
||
224 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
225 |
boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(recv, 1L, 2L); |
36934 | 226 |
assertEquals(r, true, "weakCompareAndSetRelease long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
227 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 228 |
assertEquals(x, 2L, "weakCompareAndSetRelease long"); |
229 |
} |
|
230 |
||
231 |
// Compare set and get |
|
232 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
233 |
long o = (long) hs.get(TestAccessMode.GET_AND_SET).invokeExact(recv, 1L); |
36934 | 234 |
assertEquals(o, 2L, "getAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
235 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv); |
36934 | 236 |
assertEquals(x, 1L, "getAndSet long value"); |
237 |
} |
|
238 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
239 |
hs.get(TestAccessMode.SET).invokeExact(recv, 1L); |
36934 | 240 |
|
241 |
// get and add, add and get |
|
242 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
243 |
long o = (long) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, 3L); |
36934 | 244 |
assertEquals(o, 1L, "getAndAdd long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
245 |
long c = (long) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, 3L); |
36934 | 246 |
assertEquals(c, 1L + 3L + 3L, "getAndAdd long value"); |
247 |
} |
|
248 |
} |
|
249 |
||
250 |
static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessLong recv, Handles hs) throws Throwable { |
|
251 |
||
252 |
} |
|
253 |
||
254 |
||
255 |
static void testStaticField(Handles hs) throws Throwable { |
|
256 |
// Plain |
|
257 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
258 |
hs.get(TestAccessMode.SET).invokeExact(1L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
259 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 260 |
assertEquals(x, 1L, "set long value"); |
261 |
} |
|
262 |
||
263 |
||
264 |
// Volatile |
|
265 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
266 |
hs.get(TestAccessMode.SET_VOLATILE).invokeExact(2L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
267 |
long x = (long) hs.get(TestAccessMode.GET_VOLATILE).invokeExact(); |
36934 | 268 |
assertEquals(x, 2L, "setVolatile long value"); |
269 |
} |
|
270 |
||
271 |
// Lazy |
|
272 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
273 |
hs.get(TestAccessMode.SET_RELEASE).invokeExact(1L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
274 |
long x = (long) hs.get(TestAccessMode.GET_ACQUIRE).invokeExact(); |
36934 | 275 |
assertEquals(x, 1L, "setRelease long value"); |
276 |
} |
|
277 |
||
278 |
// Opaque |
|
279 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
280 |
hs.get(TestAccessMode.SET_OPAQUE).invokeExact(2L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
281 |
long x = (long) hs.get(TestAccessMode.GET_OPAQUE).invokeExact(); |
36934 | 282 |
assertEquals(x, 2L, "setOpaque long value"); |
283 |
} |
|
284 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
285 |
hs.get(TestAccessMode.SET).invokeExact(1L); |
36934 | 286 |
|
287 |
// Compare |
|
288 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
289 |
boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(1L, 2L); |
36934 | 290 |
assertEquals(r, true, "success compareAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
291 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 292 |
assertEquals(x, 2L, "success compareAndSet long value"); |
293 |
} |
|
294 |
||
295 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
296 |
boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(1L, 3L); |
36934 | 297 |
assertEquals(r, false, "failing compareAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
298 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 299 |
assertEquals(x, 2L, "failing compareAndSet long value"); |
300 |
} |
|
301 |
||
302 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
303 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(2L, 1L); |
36934 | 304 |
assertEquals(r, 2L, "success compareAndExchangeVolatile long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
305 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 306 |
assertEquals(x, 1L, "success compareAndExchangeVolatile long value"); |
307 |
} |
|
308 |
||
309 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
310 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(2L, 3L); |
36934 | 311 |
assertEquals(r, 1L, "failing compareAndExchangeVolatile long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
312 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 313 |
assertEquals(x, 1L, "failing compareAndExchangeVolatile long value"); |
314 |
} |
|
315 |
||
316 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
317 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(1L, 2L); |
36934 | 318 |
assertEquals(r, 1L, "success compareAndExchangeAcquire long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
319 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 320 |
assertEquals(x, 2L, "success compareAndExchangeAcquire long value"); |
321 |
} |
|
322 |
||
323 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
324 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(1L, 3L); |
36934 | 325 |
assertEquals(r, 2L, "failing compareAndExchangeAcquire long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
326 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 327 |
assertEquals(x, 2L, "failing compareAndExchangeAcquire long value"); |
328 |
} |
|
329 |
||
330 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
331 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(2L, 1L); |
36934 | 332 |
assertEquals(r, 2L, "success compareAndExchangeRelease long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
333 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 334 |
assertEquals(x, 1L, "success compareAndExchangeRelease long value"); |
335 |
} |
|
336 |
||
337 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
338 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(2L, 3L); |
36934 | 339 |
assertEquals(r, 1L, "failing compareAndExchangeRelease long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
340 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 341 |
assertEquals(x, 1L, "failing compareAndExchangeRelease long value"); |
342 |
} |
|
343 |
||
344 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
345 |
boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(1L, 2L); |
36934 | 346 |
assertEquals(r, true, "weakCompareAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
347 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 348 |
assertEquals(x, 2L, "weakCompareAndSet long value"); |
349 |
} |
|
350 |
||
351 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
352 |
boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(2L, 1L); |
36934 | 353 |
assertEquals(r, true, "weakCompareAndSetAcquire long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
354 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 355 |
assertEquals(x, 1L, "weakCompareAndSetAcquire long"); |
356 |
} |
|
357 |
||
358 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
359 |
boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact( 1L, 2L); |
36934 | 360 |
assertEquals(r, true, "weakCompareAndSetRelease long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
361 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 362 |
assertEquals(x, 2L, "weakCompareAndSetRelease long"); |
363 |
} |
|
364 |
||
365 |
// Compare set and get |
|
366 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
367 |
long o = (long) hs.get(TestAccessMode.GET_AND_SET).invokeExact( 1L); |
36934 | 368 |
assertEquals(o, 2L, "getAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
369 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(); |
36934 | 370 |
assertEquals(x, 1L, "getAndSet long value"); |
371 |
} |
|
372 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
373 |
hs.get(TestAccessMode.SET).invokeExact(1L); |
36934 | 374 |
|
375 |
// get and add, add and get |
|
376 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
377 |
long o = (long) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( 3L); |
36934 | 378 |
assertEquals(o, 1L, "getAndAdd long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
379 |
long c = (long) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(3L); |
36934 | 380 |
assertEquals(c, 1L + 3L + 3L, "getAndAdd long value"); |
381 |
} |
|
382 |
} |
|
383 |
||
384 |
static void testStaticFieldUnsupported(Handles hs) throws Throwable { |
|
385 |
||
386 |
} |
|
387 |
||
388 |
||
389 |
static void testArray(Handles hs) throws Throwable { |
|
390 |
long[] array = new long[10]; |
|
391 |
||
392 |
for (int i = 0; i < array.length; i++) { |
|
393 |
// Plain |
|
394 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
395 |
hs.get(TestAccessMode.SET).invokeExact(array, i, 1L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
396 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 397 |
assertEquals(x, 1L, "get long value"); |
398 |
} |
|
399 |
||
400 |
||
401 |
// Volatile |
|
402 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
403 |
hs.get(TestAccessMode.SET_VOLATILE).invokeExact(array, i, 2L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
404 |
long x = (long) hs.get(TestAccessMode.GET_VOLATILE).invokeExact(array, i); |
36934 | 405 |
assertEquals(x, 2L, "setVolatile long value"); |
406 |
} |
|
407 |
||
408 |
// Lazy |
|
409 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
410 |
hs.get(TestAccessMode.SET_RELEASE).invokeExact(array, i, 1L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
411 |
long x = (long) hs.get(TestAccessMode.GET_ACQUIRE).invokeExact(array, i); |
36934 | 412 |
assertEquals(x, 1L, "setRelease long value"); |
413 |
} |
|
414 |
||
415 |
// Opaque |
|
416 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
417 |
hs.get(TestAccessMode.SET_OPAQUE).invokeExact(array, i, 2L); |
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
418 |
long x = (long) hs.get(TestAccessMode.GET_OPAQUE).invokeExact(array, i); |
36934 | 419 |
assertEquals(x, 2L, "setOpaque long value"); |
420 |
} |
|
421 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
422 |
hs.get(TestAccessMode.SET).invokeExact(array, i, 1L); |
36934 | 423 |
|
424 |
// Compare |
|
425 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
426 |
boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(array, i, 1L, 2L); |
36934 | 427 |
assertEquals(r, true, "success compareAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
428 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 429 |
assertEquals(x, 2L, "success compareAndSet long value"); |
430 |
} |
|
431 |
||
432 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
433 |
boolean r = (boolean) hs.get(TestAccessMode.COMPARE_AND_SET).invokeExact(array, i, 1L, 3L); |
36934 | 434 |
assertEquals(r, false, "failing compareAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
435 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 436 |
assertEquals(x, 2L, "failing compareAndSet long value"); |
437 |
} |
|
438 |
||
439 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
440 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(array, i, 2L, 1L); |
36934 | 441 |
assertEquals(r, 2L, "success compareAndExchangeVolatile long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
442 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 443 |
assertEquals(x, 1L, "success compareAndExchangeVolatile long value"); |
444 |
} |
|
445 |
||
446 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
447 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_VOLATILE).invokeExact(array, i, 2L, 3L); |
36934 | 448 |
assertEquals(r, 1L, "failing compareAndExchangeVolatile long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
449 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 450 |
assertEquals(x, 1L, "failing compareAndExchangeVolatile long value"); |
451 |
} |
|
452 |
||
453 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
454 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(array, i, 1L, 2L); |
36934 | 455 |
assertEquals(r, 1L, "success compareAndExchangeAcquire long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
456 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 457 |
assertEquals(x, 2L, "success compareAndExchangeAcquire long value"); |
458 |
} |
|
459 |
||
460 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
461 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_ACQUIRE).invokeExact(array, i, 1L, 3L); |
36934 | 462 |
assertEquals(r, 2L, "failing compareAndExchangeAcquire long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
463 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 464 |
assertEquals(x, 2L, "failing compareAndExchangeAcquire long value"); |
465 |
} |
|
466 |
||
467 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
468 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(array, i, 2L, 1L); |
36934 | 469 |
assertEquals(r, 2L, "success compareAndExchangeRelease long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
470 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 471 |
assertEquals(x, 1L, "success compareAndExchangeRelease long value"); |
472 |
} |
|
473 |
||
474 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
475 |
long r = (long) hs.get(TestAccessMode.COMPARE_AND_EXCHANGE_RELEASE).invokeExact(array, i, 2L, 3L); |
36934 | 476 |
assertEquals(r, 1L, "failing compareAndExchangeRelease long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
477 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 478 |
assertEquals(x, 1L, "failing compareAndExchangeRelease long value"); |
479 |
} |
|
480 |
||
481 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
482 |
boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 1L, 2L); |
36934 | 483 |
assertEquals(r, true, "weakCompareAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
484 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 485 |
assertEquals(x, 2L, "weakCompareAndSet long value"); |
486 |
} |
|
487 |
||
488 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
489 |
boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_ACQUIRE).invokeExact(array, i, 2L, 1L); |
36934 | 490 |
assertEquals(r, true, "weakCompareAndSetAcquire long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
491 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 492 |
assertEquals(x, 1L, "weakCompareAndSetAcquire long"); |
493 |
} |
|
494 |
||
495 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
496 |
boolean r = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_RELEASE).invokeExact(array, i, 1L, 2L); |
36934 | 497 |
assertEquals(r, true, "weakCompareAndSetRelease long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
498 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 499 |
assertEquals(x, 2L, "weakCompareAndSetRelease long"); |
500 |
} |
|
501 |
||
502 |
// Compare set and get |
|
503 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
504 |
long o = (long) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, 1L); |
36934 | 505 |
assertEquals(o, 2L, "getAndSet long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
506 |
long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i); |
36934 | 507 |
assertEquals(x, 1L, "getAndSet long value"); |
508 |
} |
|
509 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
510 |
hs.get(TestAccessMode.SET).invokeExact(array, i, 1L); |
36934 | 511 |
|
512 |
// get and add, add and get |
|
513 |
{ |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
514 |
long o = (long) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, 3L); |
36934 | 515 |
assertEquals(o, 1L, "getAndAdd long"); |
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
516 |
long c = (long) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, 3L); |
36934 | 517 |
assertEquals(c, 1L + 3L + 3L, "getAndAdd long value"); |
518 |
} |
|
519 |
} |
|
520 |
} |
|
521 |
||
522 |
static void testArrayUnsupported(Handles hs) throws Throwable { |
|
523 |
long[] array = new long[10]; |
|
524 |
||
525 |
final int i = 0; |
|
526 |
||
527 |
} |
|
528 |
||
529 |
static void testArrayIndexOutOfBounds(Handles hs) throws Throwable { |
|
530 |
long[] array = new long[10]; |
|
531 |
||
532 |
for (int i : new int[]{-1, Integer.MIN_VALUE, 10, 11, Integer.MAX_VALUE}) { |
|
533 |
final int ci = i; |
|
534 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
535 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET)) { |
36934 | 536 |
checkIOOBE(am, () -> { |
537 |
long x = (long) hs.get(am).invokeExact(array, ci); |
|
538 |
}); |
|
539 |
} |
|
540 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
541 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.SET)) { |
36934 | 542 |
checkIOOBE(am, () -> { |
543 |
hs.get(am).invokeExact(array, ci, 1L); |
|
544 |
}); |
|
545 |
} |
|
546 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
547 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) { |
36934 | 548 |
checkIOOBE(am, () -> { |
549 |
boolean r = (boolean) hs.get(am).invokeExact(array, ci, 1L, 2L); |
|
550 |
}); |
|
551 |
} |
|
552 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
553 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) { |
36934 | 554 |
checkIOOBE(am, () -> { |
555 |
long r = (long) hs.get(am).invokeExact(array, ci, 2L, 1L); |
|
556 |
}); |
|
557 |
} |
|
558 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
559 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) { |
36934 | 560 |
checkIOOBE(am, () -> { |
561 |
long o = (long) hs.get(am).invokeExact(array, ci, 1L); |
|
562 |
}); |
|
563 |
} |
|
564 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
565 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) { |
36934 | 566 |
checkIOOBE(am, () -> { |
567 |
long o = (long) hs.get(am).invokeExact(array, ci, 3L); |
|
568 |
}); |
|
569 |
} |
|
570 |
} |
|
571 |
} |
|
572 |
} |
|
573 |