author | psandoz |
Thu, 23 Jun 2016 13:46:48 +0200 | |
changeset 39472 | 6df82f4c63ac |
parent 39471 | 6622892a347a |
child 40684 | 2e37c119dc2a |
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 |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
26 |
* @bug 8156486 |
36934 | 27 |
* @run testng/othervm VarHandleTestMethodTypeFloat |
28 |
* @run testng/othervm -Djava.lang.invoke.VarHandle.VAR_HANDLE_GUARDS=false VarHandleTestMethodTypeFloat |
|
29 |
*/ |
|
30 |
||
31 |
import org.testng.annotations.BeforeClass; |
|
32 |
import org.testng.annotations.DataProvider; |
|
33 |
import org.testng.annotations.Test; |
|
34 |
||
35 |
import java.lang.invoke.MethodHandles; |
|
36 |
import java.lang.invoke.VarHandle; |
|
37 |
import java.util.ArrayList; |
|
38 |
import java.util.Arrays; |
|
39 |
import java.util.List; |
|
40 |
||
41 |
import static org.testng.Assert.*; |
|
42 |
||
43 |
import static java.lang.invoke.MethodType.*; |
|
44 |
||
45 |
public class VarHandleTestMethodTypeFloat extends VarHandleBaseTest { |
|
46 |
static final float static_final_v = 1.0f; |
|
47 |
||
48 |
static float static_v = 1.0f; |
|
49 |
||
50 |
final float final_v = 1.0f; |
|
51 |
||
52 |
float v = 1.0f; |
|
53 |
||
54 |
VarHandle vhFinalField; |
|
55 |
||
56 |
VarHandle vhField; |
|
57 |
||
58 |
VarHandle vhStaticField; |
|
59 |
||
60 |
VarHandle vhStaticFinalField; |
|
61 |
||
62 |
VarHandle vhArray; |
|
63 |
||
64 |
@BeforeClass |
|
65 |
public void setup() throws Exception { |
|
66 |
vhFinalField = MethodHandles.lookup().findVarHandle( |
|
67 |
VarHandleTestMethodTypeFloat.class, "final_v", float.class); |
|
68 |
||
69 |
vhField = MethodHandles.lookup().findVarHandle( |
|
70 |
VarHandleTestMethodTypeFloat.class, "v", float.class); |
|
71 |
||
72 |
vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle( |
|
73 |
VarHandleTestMethodTypeFloat.class, "static_final_v", float.class); |
|
74 |
||
75 |
vhStaticField = MethodHandles.lookup().findStaticVarHandle( |
|
76 |
VarHandleTestMethodTypeFloat.class, "static_v", float.class); |
|
77 |
||
78 |
vhArray = MethodHandles.arrayElementVarHandle(float[].class); |
|
79 |
} |
|
80 |
||
81 |
@DataProvider |
|
82 |
public Object[][] accessTestCaseProvider() throws Exception { |
|
83 |
List<AccessTestCase<?>> cases = new ArrayList<>(); |
|
84 |
||
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
85 |
cases.add(new VarHandleAccessTestCase("Instance field", |
36934 | 86 |
vhField, vh -> testInstanceFieldWrongMethodType(this, vh), |
87 |
false)); |
|
88 |
||
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
89 |
cases.add(new VarHandleAccessTestCase("Static field", |
36934 | 90 |
vhStaticField, VarHandleTestMethodTypeFloat::testStaticFieldWrongMethodType, |
91 |
false)); |
|
92 |
||
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
93 |
cases.add(new VarHandleAccessTestCase("Array", |
36934 | 94 |
vhArray, VarHandleTestMethodTypeFloat::testArrayWrongMethodType, |
95 |
false)); |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
96 |
|
36934 | 97 |
for (VarHandleToMethodHandle f : VarHandleToMethodHandle.values()) { |
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
98 |
cases.add(new MethodHandleAccessTestCase("Instance field", |
36934 | 99 |
vhField, f, hs -> testInstanceFieldWrongMethodType(this, hs), |
100 |
false)); |
|
101 |
||
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
102 |
cases.add(new MethodHandleAccessTestCase("Static field", |
36934 | 103 |
vhStaticField, f, VarHandleTestMethodTypeFloat::testStaticFieldWrongMethodType, |
104 |
false)); |
|
105 |
||
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
106 |
cases.add(new MethodHandleAccessTestCase("Array", |
36934 | 107 |
vhArray, f, VarHandleTestMethodTypeFloat::testArrayWrongMethodType, |
108 |
false)); |
|
109 |
} |
|
110 |
// Work around issue with jtreg summary reporting which truncates |
|
111 |
// the String result of Object.toString to 30 characters, hence |
|
112 |
// the first dummy argument |
|
113 |
return cases.stream().map(tc -> new Object[]{tc.toString(), tc}).toArray(Object[][]::new); |
|
114 |
} |
|
115 |
||
116 |
@Test(dataProvider = "accessTestCaseProvider") |
|
117 |
public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable { |
|
118 |
T t = atc.get(); |
|
119 |
int iters = atc.requiresLoop() ? ITERS : 1; |
|
120 |
for (int c = 0; c < iters; c++) { |
|
121 |
atc.testAccess(t); |
|
122 |
} |
|
123 |
} |
|
124 |
||
125 |
||
126 |
static void testInstanceFieldWrongMethodType(VarHandleTestMethodTypeFloat recv, VarHandle vh) throws Throwable { |
|
127 |
// Get |
|
128 |
// Incorrect argument types |
|
129 |
checkNPE(() -> { // null receiver |
|
130 |
float x = (float) vh.get(null); |
|
131 |
}); |
|
132 |
checkCCE(() -> { // receiver reference class |
|
133 |
float x = (float) vh.get(Void.class); |
|
134 |
}); |
|
135 |
checkWMTE(() -> { // receiver primitive class |
|
136 |
float x = (float) vh.get(0); |
|
137 |
}); |
|
138 |
// Incorrect return type |
|
139 |
checkWMTE(() -> { // reference class |
|
140 |
Void x = (Void) vh.get(recv); |
|
141 |
}); |
|
142 |
checkWMTE(() -> { // primitive class |
|
143 |
boolean x = (boolean) vh.get(recv); |
|
144 |
}); |
|
145 |
// Incorrect arity |
|
146 |
checkWMTE(() -> { // 0 |
|
147 |
float x = (float) vh.get(); |
|
148 |
}); |
|
149 |
checkWMTE(() -> { // > |
|
150 |
float x = (float) vh.get(recv, Void.class); |
|
151 |
}); |
|
152 |
||
153 |
||
154 |
// Set |
|
155 |
// Incorrect argument types |
|
156 |
checkNPE(() -> { // null receiver |
|
157 |
vh.set(null, 1.0f); |
|
158 |
}); |
|
159 |
checkCCE(() -> { // receiver reference class |
|
160 |
vh.set(Void.class, 1.0f); |
|
161 |
}); |
|
162 |
checkWMTE(() -> { // value reference class |
|
163 |
vh.set(recv, Void.class); |
|
164 |
}); |
|
165 |
checkWMTE(() -> { // receiver primitive class |
|
166 |
vh.set(0, 1.0f); |
|
167 |
}); |
|
168 |
// Incorrect arity |
|
169 |
checkWMTE(() -> { // 0 |
|
170 |
vh.set(); |
|
171 |
}); |
|
172 |
checkWMTE(() -> { // > |
|
173 |
vh.set(recv, 1.0f, Void.class); |
|
174 |
}); |
|
175 |
||
176 |
||
177 |
// GetVolatile |
|
178 |
// Incorrect argument types |
|
179 |
checkNPE(() -> { // null receiver |
|
180 |
float x = (float) vh.getVolatile(null); |
|
181 |
}); |
|
182 |
checkCCE(() -> { // receiver reference class |
|
183 |
float x = (float) vh.getVolatile(Void.class); |
|
184 |
}); |
|
185 |
checkWMTE(() -> { // receiver primitive class |
|
186 |
float x = (float) vh.getVolatile(0); |
|
187 |
}); |
|
188 |
// Incorrect return type |
|
189 |
checkWMTE(() -> { // reference class |
|
190 |
Void x = (Void) vh.getVolatile(recv); |
|
191 |
}); |
|
192 |
checkWMTE(() -> { // primitive class |
|
193 |
boolean x = (boolean) vh.getVolatile(recv); |
|
194 |
}); |
|
195 |
// Incorrect arity |
|
196 |
checkWMTE(() -> { // 0 |
|
197 |
float x = (float) vh.getVolatile(); |
|
198 |
}); |
|
199 |
checkWMTE(() -> { // > |
|
200 |
float x = (float) vh.getVolatile(recv, Void.class); |
|
201 |
}); |
|
202 |
||
203 |
||
204 |
// SetVolatile |
|
205 |
// Incorrect argument types |
|
206 |
checkNPE(() -> { // null receiver |
|
207 |
vh.setVolatile(null, 1.0f); |
|
208 |
}); |
|
209 |
checkCCE(() -> { // receiver reference class |
|
210 |
vh.setVolatile(Void.class, 1.0f); |
|
211 |
}); |
|
212 |
checkWMTE(() -> { // value reference class |
|
213 |
vh.setVolatile(recv, Void.class); |
|
214 |
}); |
|
215 |
checkWMTE(() -> { // receiver primitive class |
|
216 |
vh.setVolatile(0, 1.0f); |
|
217 |
}); |
|
218 |
// Incorrect arity |
|
219 |
checkWMTE(() -> { // 0 |
|
220 |
vh.setVolatile(); |
|
221 |
}); |
|
222 |
checkWMTE(() -> { // > |
|
223 |
vh.setVolatile(recv, 1.0f, Void.class); |
|
224 |
}); |
|
225 |
||
226 |
||
227 |
// GetOpaque |
|
228 |
// Incorrect argument types |
|
229 |
checkNPE(() -> { // null receiver |
|
230 |
float x = (float) vh.getOpaque(null); |
|
231 |
}); |
|
232 |
checkCCE(() -> { // receiver reference class |
|
233 |
float x = (float) vh.getOpaque(Void.class); |
|
234 |
}); |
|
235 |
checkWMTE(() -> { // receiver primitive class |
|
236 |
float x = (float) vh.getOpaque(0); |
|
237 |
}); |
|
238 |
// Incorrect return type |
|
239 |
checkWMTE(() -> { // reference class |
|
240 |
Void x = (Void) vh.getOpaque(recv); |
|
241 |
}); |
|
242 |
checkWMTE(() -> { // primitive class |
|
243 |
boolean x = (boolean) vh.getOpaque(recv); |
|
244 |
}); |
|
245 |
// Incorrect arity |
|
246 |
checkWMTE(() -> { // 0 |
|
247 |
float x = (float) vh.getOpaque(); |
|
248 |
}); |
|
249 |
checkWMTE(() -> { // > |
|
250 |
float x = (float) vh.getOpaque(recv, Void.class); |
|
251 |
}); |
|
252 |
||
253 |
||
254 |
// SetOpaque |
|
255 |
// Incorrect argument types |
|
256 |
checkNPE(() -> { // null receiver |
|
257 |
vh.setOpaque(null, 1.0f); |
|
258 |
}); |
|
259 |
checkCCE(() -> { // receiver reference class |
|
260 |
vh.setOpaque(Void.class, 1.0f); |
|
261 |
}); |
|
262 |
checkWMTE(() -> { // value reference class |
|
263 |
vh.setOpaque(recv, Void.class); |
|
264 |
}); |
|
265 |
checkWMTE(() -> { // receiver primitive class |
|
266 |
vh.setOpaque(0, 1.0f); |
|
267 |
}); |
|
268 |
// Incorrect arity |
|
269 |
checkWMTE(() -> { // 0 |
|
270 |
vh.setOpaque(); |
|
271 |
}); |
|
272 |
checkWMTE(() -> { // > |
|
273 |
vh.setOpaque(recv, 1.0f, Void.class); |
|
274 |
}); |
|
275 |
||
276 |
||
277 |
// GetAcquire |
|
278 |
// Incorrect argument types |
|
279 |
checkNPE(() -> { // null receiver |
|
280 |
float x = (float) vh.getAcquire(null); |
|
281 |
}); |
|
282 |
checkCCE(() -> { // receiver reference class |
|
283 |
float x = (float) vh.getAcquire(Void.class); |
|
284 |
}); |
|
285 |
checkWMTE(() -> { // receiver primitive class |
|
286 |
float x = (float) vh.getAcquire(0); |
|
287 |
}); |
|
288 |
// Incorrect return type |
|
289 |
checkWMTE(() -> { // reference class |
|
290 |
Void x = (Void) vh.getAcquire(recv); |
|
291 |
}); |
|
292 |
checkWMTE(() -> { // primitive class |
|
293 |
boolean x = (boolean) vh.getAcquire(recv); |
|
294 |
}); |
|
295 |
// Incorrect arity |
|
296 |
checkWMTE(() -> { // 0 |
|
297 |
float x = (float) vh.getAcquire(); |
|
298 |
}); |
|
299 |
checkWMTE(() -> { // > |
|
300 |
float x = (float) vh.getAcquire(recv, Void.class); |
|
301 |
}); |
|
302 |
||
303 |
||
304 |
// SetRelease |
|
305 |
// Incorrect argument types |
|
306 |
checkNPE(() -> { // null receiver |
|
307 |
vh.setRelease(null, 1.0f); |
|
308 |
}); |
|
309 |
checkCCE(() -> { // receiver reference class |
|
310 |
vh.setRelease(Void.class, 1.0f); |
|
311 |
}); |
|
312 |
checkWMTE(() -> { // value reference class |
|
313 |
vh.setRelease(recv, Void.class); |
|
314 |
}); |
|
315 |
checkWMTE(() -> { // receiver primitive class |
|
316 |
vh.setRelease(0, 1.0f); |
|
317 |
}); |
|
318 |
// Incorrect arity |
|
319 |
checkWMTE(() -> { // 0 |
|
320 |
vh.setRelease(); |
|
321 |
}); |
|
322 |
checkWMTE(() -> { // > |
|
323 |
vh.setRelease(recv, 1.0f, Void.class); |
|
324 |
}); |
|
325 |
||
326 |
||
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
327 |
// CompareAndSet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
328 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
329 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
330 |
boolean r = vh.compareAndSet(null, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
331 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
332 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
333 |
boolean r = vh.compareAndSet(Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
334 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
335 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
336 |
boolean r = vh.compareAndSet(recv, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
337 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
338 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
339 |
boolean r = vh.compareAndSet(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
340 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
341 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
342 |
boolean r = vh.compareAndSet(0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
343 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
344 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
345 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
346 |
boolean r = vh.compareAndSet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
347 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
348 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
349 |
boolean r = vh.compareAndSet(recv, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
350 |
}); |
36934 | 351 |
|
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
352 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
353 |
// WeakCompareAndSet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
354 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
355 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
356 |
boolean r = vh.weakCompareAndSet(null, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
357 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
358 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
359 |
boolean r = vh.weakCompareAndSet(Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
360 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
361 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
362 |
boolean r = vh.weakCompareAndSet(recv, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
363 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
364 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
365 |
boolean r = vh.weakCompareAndSet(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
366 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
367 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
368 |
boolean r = vh.weakCompareAndSet(0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
369 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
370 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
371 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
372 |
boolean r = vh.weakCompareAndSet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
373 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
374 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
375 |
boolean r = vh.weakCompareAndSet(recv, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
376 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
377 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
378 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
379 |
// WeakCompareAndSetVolatile |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
380 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
381 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
382 |
boolean r = vh.weakCompareAndSetVolatile(null, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
383 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
384 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
385 |
boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
386 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
387 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
388 |
boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
389 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
390 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
391 |
boolean r = vh.weakCompareAndSetVolatile(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
392 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
393 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
394 |
boolean r = vh.weakCompareAndSetVolatile(0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
395 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
396 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
397 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
398 |
boolean r = vh.weakCompareAndSetVolatile(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
399 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
400 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
401 |
boolean r = vh.weakCompareAndSetVolatile(recv, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
402 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
403 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
404 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
405 |
// WeakCompareAndSetAcquire |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
406 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
407 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
408 |
boolean r = vh.weakCompareAndSetAcquire(null, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
409 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
410 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
411 |
boolean r = vh.weakCompareAndSetAcquire(Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
412 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
413 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
414 |
boolean r = vh.weakCompareAndSetAcquire(recv, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
415 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
416 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
417 |
boolean r = vh.weakCompareAndSetAcquire(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
418 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
419 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
420 |
boolean r = vh.weakCompareAndSetAcquire(0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
421 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
422 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
423 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
424 |
boolean r = vh.weakCompareAndSetAcquire(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
425 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
426 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
427 |
boolean r = vh.weakCompareAndSetAcquire(recv, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
428 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
429 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
430 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
431 |
// WeakCompareAndSetRelease |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
432 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
433 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
434 |
boolean r = vh.weakCompareAndSetRelease(null, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
435 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
436 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
437 |
boolean r = vh.weakCompareAndSetRelease(Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
438 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
439 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
440 |
boolean r = vh.weakCompareAndSetRelease(recv, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
441 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
442 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
443 |
boolean r = vh.weakCompareAndSetRelease(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
444 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
445 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
446 |
boolean r = vh.weakCompareAndSetRelease(0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
447 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
448 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
449 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
450 |
boolean r = vh.weakCompareAndSetRelease(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
451 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
452 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
453 |
boolean r = vh.weakCompareAndSetRelease(recv, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
454 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
455 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
456 |
|
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
457 |
// CompareAndExchange |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
458 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
459 |
checkNPE(() -> { // null receiver |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
460 |
float x = (float) vh.compareAndExchange(null, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
461 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
462 |
checkCCE(() -> { // receiver reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
463 |
float x = (float) vh.compareAndExchange(Void.class, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
464 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
465 |
checkWMTE(() -> { // expected reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
466 |
float x = (float) vh.compareAndExchange(recv, Void.class, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
467 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
468 |
checkWMTE(() -> { // actual reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
469 |
float x = (float) vh.compareAndExchange(recv, 1.0f, Void.class); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
470 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
471 |
checkWMTE(() -> { // reciever primitive class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
472 |
float x = (float) vh.compareAndExchange(0, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
473 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
474 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
475 |
checkWMTE(() -> { // reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
476 |
Void r = (Void) vh.compareAndExchange(recv, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
477 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
478 |
checkWMTE(() -> { // primitive class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
479 |
boolean x = (boolean) vh.compareAndExchange(recv, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
480 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
481 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
482 |
checkWMTE(() -> { // 0 |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
483 |
float x = (float) vh.compareAndExchange(); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
484 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
485 |
checkWMTE(() -> { // > |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
486 |
float x = (float) vh.compareAndExchange(recv, 1.0f, 1.0f, Void.class); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
487 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
488 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
489 |
|
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
490 |
// CompareAndExchangeAcquire |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
491 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
492 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
493 |
float x = (float) vh.compareAndExchangeAcquire(null, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
494 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
495 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
496 |
float x = (float) vh.compareAndExchangeAcquire(Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
497 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
498 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
499 |
float x = (float) vh.compareAndExchangeAcquire(recv, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
500 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
501 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
502 |
float x = (float) vh.compareAndExchangeAcquire(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
503 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
504 |
checkWMTE(() -> { // reciever primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
505 |
float x = (float) vh.compareAndExchangeAcquire(0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
506 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
507 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
508 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
509 |
Void r = (Void) vh.compareAndExchangeAcquire(recv, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
510 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
511 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
512 |
boolean x = (boolean) vh.compareAndExchangeAcquire(recv, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
513 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
514 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
515 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
516 |
float x = (float) vh.compareAndExchangeAcquire(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
517 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
518 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
519 |
float x = (float) vh.compareAndExchangeAcquire(recv, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
520 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
521 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
522 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
523 |
// CompareAndExchangeRelease |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
524 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
525 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
526 |
float x = (float) vh.compareAndExchangeRelease(null, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
527 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
528 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
529 |
float x = (float) vh.compareAndExchangeRelease(Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
530 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
531 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
532 |
float x = (float) vh.compareAndExchangeRelease(recv, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
533 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
534 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
535 |
float x = (float) vh.compareAndExchangeRelease(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
536 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
537 |
checkWMTE(() -> { // reciever primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
538 |
float x = (float) vh.compareAndExchangeRelease(0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
539 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
540 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
541 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
542 |
Void r = (Void) vh.compareAndExchangeRelease(recv, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
543 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
544 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
545 |
boolean x = (boolean) vh.compareAndExchangeRelease(recv, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
546 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
547 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
548 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
549 |
float x = (float) vh.compareAndExchangeRelease(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
550 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
551 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
552 |
float x = (float) vh.compareAndExchangeRelease(recv, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
553 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
554 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
555 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
556 |
// GetAndSet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
557 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
558 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
559 |
float x = (float) vh.getAndSet(null, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
560 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
561 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
562 |
float x = (float) vh.getAndSet(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
563 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
564 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
565 |
float x = (float) vh.getAndSet(recv, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
566 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
567 |
checkWMTE(() -> { // reciever primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
568 |
float x = (float) vh.getAndSet(0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
569 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
570 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
571 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
572 |
Void r = (Void) vh.getAndSet(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
573 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
574 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
575 |
boolean x = (boolean) vh.getAndSet(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
576 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
577 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
578 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
579 |
float x = (float) vh.getAndSet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
580 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
581 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
582 |
float x = (float) vh.getAndSet(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
583 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
584 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
585 |
// GetAndAdd |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
586 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
587 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
588 |
float x = (float) vh.getAndAdd(null, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
589 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
590 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
591 |
float x = (float) vh.getAndAdd(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
592 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
593 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
594 |
float x = (float) vh.getAndAdd(recv, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
595 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
596 |
checkWMTE(() -> { // reciever primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
597 |
float x = (float) vh.getAndAdd(0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
598 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
599 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
600 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
601 |
Void r = (Void) vh.getAndAdd(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
602 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
603 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
604 |
boolean x = (boolean) vh.getAndAdd(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
605 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
606 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
607 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
608 |
float x = (float) vh.getAndAdd(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
609 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
610 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
611 |
float x = (float) vh.getAndAdd(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
612 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
613 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
614 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
615 |
// AddAndGet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
616 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
617 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
618 |
float x = (float) vh.addAndGet(null, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
619 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
620 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
621 |
float x = (float) vh.addAndGet(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
622 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
623 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
624 |
float x = (float) vh.addAndGet(recv, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
625 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
626 |
checkWMTE(() -> { // reciever primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
627 |
float x = (float) vh.addAndGet(0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
628 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
629 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
630 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
631 |
Void r = (Void) vh.addAndGet(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
632 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
633 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
634 |
boolean x = (boolean) vh.addAndGet(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
635 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
636 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
637 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
638 |
float x = (float) vh.addAndGet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
639 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
640 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
641 |
float x = (float) vh.addAndGet(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
642 |
}); |
36934 | 643 |
} |
644 |
||
645 |
static void testInstanceFieldWrongMethodType(VarHandleTestMethodTypeFloat recv, Handles hs) throws Throwable { |
|
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
646 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET)) { |
36934 | 647 |
// Incorrect argument types |
648 |
checkNPE(() -> { // null receiver |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
649 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class)). |
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
650 |
invokeExact((VarHandleTestMethodTypeFloat) null); |
36934 | 651 |
}); |
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
652 |
hs.checkWMTEOrCCE(() -> { // receiver reference class |
36934 | 653 |
float x = (float) hs.get(am, methodType(float.class, Class.class)). |
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
654 |
invokeExact(Void.class); |
36934 | 655 |
}); |
656 |
checkWMTE(() -> { // receiver primitive class |
|
657 |
float x = (float) hs.get(am, methodType(float.class, int.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
658 |
invokeExact(0); |
36934 | 659 |
}); |
660 |
// Incorrect return type |
|
661 |
checkWMTE(() -> { // reference class |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
662 |
Void x = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class)). |
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
663 |
invokeExact(recv); |
36934 | 664 |
}); |
665 |
checkWMTE(() -> { // primitive class |
|
666 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
667 |
invokeExact(recv); |
36934 | 668 |
}); |
669 |
// Incorrect arity |
|
670 |
checkWMTE(() -> { // 0 |
|
671 |
float x = (float) hs.get(am, methodType(float.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
672 |
invokeExact(); |
36934 | 673 |
}); |
674 |
checkWMTE(() -> { // > |
|
675 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
676 |
invokeExact(recv, Void.class); |
36934 | 677 |
}); |
678 |
} |
|
679 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
680 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.SET)) { |
36934 | 681 |
// Incorrect argument types |
682 |
checkNPE(() -> { // null receiver |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
683 |
hs.get(am, methodType(void.class, VarHandleTestMethodTypeFloat.class, float.class)). |
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
684 |
invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f); |
36934 | 685 |
}); |
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
686 |
hs.checkWMTEOrCCE(() -> { // receiver reference class |
36934 | 687 |
hs.get(am, methodType(void.class, Class.class, float.class)). |
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
688 |
invokeExact(Void.class, 1.0f); |
36934 | 689 |
}); |
690 |
checkWMTE(() -> { // value reference class |
|
691 |
hs.get(am, methodType(void.class, VarHandleTestMethodTypeFloat.class, Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
692 |
invokeExact(recv, Void.class); |
36934 | 693 |
}); |
694 |
checkWMTE(() -> { // receiver primitive class |
|
695 |
hs.get(am, methodType(void.class, int.class, float.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
696 |
invokeExact(0, 1.0f); |
36934 | 697 |
}); |
698 |
// Incorrect arity |
|
699 |
checkWMTE(() -> { // 0 |
|
700 |
hs.get(am, methodType(void.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
701 |
invokeExact(); |
36934 | 702 |
}); |
703 |
checkWMTE(() -> { // > |
|
704 |
hs.get(am, methodType(void.class, VarHandleTestMethodTypeFloat.class, float.class, Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
705 |
invokeExact(recv, 1.0f, Void.class); |
36934 | 706 |
}); |
707 |
} |
|
708 |
||
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
709 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
710 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
711 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
712 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
713 |
invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
714 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
715 |
hs.checkWMTEOrCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
716 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
717 |
invokeExact(Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
718 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
719 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
720 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
721 |
invokeExact(recv, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
722 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
723 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
724 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
725 |
invokeExact(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
726 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
727 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
728 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class , float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
729 |
invokeExact(0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
730 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
731 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
732 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
733 |
boolean r = (boolean) hs.get(am, methodType(boolean.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
734 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
735 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
736 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
737 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, float.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
738 |
invokeExact(recv, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
739 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
740 |
} |
36934 | 741 |
|
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
742 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
743 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
744 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
745 |
invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
746 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
747 |
hs.checkWMTEOrCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
748 |
float x = (float) hs.get(am, methodType(float.class, Class.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
749 |
invokeExact(Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
750 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
751 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
752 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
753 |
invokeExact(recv, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
754 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
755 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
756 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
757 |
invokeExact(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
758 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
759 |
checkWMTE(() -> { // reciever primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
760 |
float x = (float) hs.get(am, methodType(float.class, int.class , float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
761 |
invokeExact(0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
762 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
763 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
764 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
765 |
Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class , float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
766 |
invokeExact(recv, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
767 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
768 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
769 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class , float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
770 |
invokeExact(recv, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
771 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
772 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
773 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
774 |
float x = (float) hs.get(am, methodType(float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
775 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
776 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
777 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
778 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
779 |
invokeExact(recv, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
780 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
781 |
} |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
782 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
783 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
784 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
785 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
786 |
invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
787 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
788 |
hs.checkWMTEOrCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
789 |
float x = (float) hs.get(am, methodType(float.class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
790 |
invokeExact(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
791 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
792 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
793 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
794 |
invokeExact(recv, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
795 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
796 |
checkWMTE(() -> { // reciever primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
797 |
float x = (float) hs.get(am, methodType(float.class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
798 |
invokeExact(0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
799 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
800 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
801 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
802 |
Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
803 |
invokeExact(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
804 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
805 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
806 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
807 |
invokeExact(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
808 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
809 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
810 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
811 |
float x = (float) hs.get(am, methodType(float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
812 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
813 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
814 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
815 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
816 |
invokeExact(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
817 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
818 |
} |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
819 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
820 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
821 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
822 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
823 |
invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
824 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
825 |
hs.checkWMTEOrCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
826 |
float x = (float) hs.get(am, methodType(float.class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
827 |
invokeExact(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
828 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
829 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
830 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
831 |
invokeExact(recv, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
832 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
833 |
checkWMTE(() -> { // reciever primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
834 |
float x = (float) hs.get(am, methodType(float.class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
835 |
invokeExact(0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
836 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
837 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
838 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
839 |
Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
840 |
invokeExact(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
841 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
842 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
843 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
844 |
invokeExact(recv, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
845 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
846 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
847 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
848 |
float x = (float) hs.get(am, methodType(float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
849 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
850 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
851 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
852 |
float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
853 |
invokeExact(recv, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
854 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
855 |
} |
36934 | 856 |
} |
857 |
||
858 |
||
859 |
static void testStaticFieldWrongMethodType(VarHandle vh) throws Throwable { |
|
860 |
// Get |
|
861 |
// Incorrect return type |
|
862 |
checkWMTE(() -> { // reference class |
|
863 |
Void x = (Void) vh.get(); |
|
864 |
}); |
|
865 |
checkWMTE(() -> { // primitive class |
|
866 |
boolean x = (boolean) vh.get(); |
|
867 |
}); |
|
868 |
// Incorrect arity |
|
869 |
checkWMTE(() -> { // > |
|
870 |
float x = (float) vh.get(Void.class); |
|
871 |
}); |
|
872 |
||
873 |
||
874 |
// Set |
|
875 |
// Incorrect argument types |
|
876 |
checkWMTE(() -> { // value reference class |
|
877 |
vh.set(Void.class); |
|
878 |
}); |
|
879 |
// Incorrect arity |
|
880 |
checkWMTE(() -> { // 0 |
|
881 |
vh.set(); |
|
882 |
}); |
|
883 |
checkWMTE(() -> { // > |
|
884 |
vh.set(1.0f, Void.class); |
|
885 |
}); |
|
886 |
||
887 |
||
888 |
// GetVolatile |
|
889 |
// Incorrect return type |
|
890 |
checkWMTE(() -> { // reference class |
|
891 |
Void x = (Void) vh.getVolatile(); |
|
892 |
}); |
|
893 |
checkWMTE(() -> { // primitive class |
|
894 |
boolean x = (boolean) vh.getVolatile(); |
|
895 |
}); |
|
896 |
checkWMTE(() -> { // > |
|
897 |
float x = (float) vh.getVolatile(Void.class); |
|
898 |
}); |
|
899 |
||
900 |
||
901 |
// SetVolatile |
|
902 |
// Incorrect argument types |
|
903 |
checkWMTE(() -> { // value reference class |
|
904 |
vh.setVolatile(Void.class); |
|
905 |
}); |
|
906 |
// Incorrect arity |
|
907 |
checkWMTE(() -> { // 0 |
|
908 |
vh.setVolatile(); |
|
909 |
}); |
|
910 |
checkWMTE(() -> { // > |
|
911 |
vh.setVolatile(1.0f, Void.class); |
|
912 |
}); |
|
913 |
||
914 |
||
915 |
// GetOpaque |
|
916 |
// Incorrect return type |
|
917 |
checkWMTE(() -> { // reference class |
|
918 |
Void x = (Void) vh.getOpaque(); |
|
919 |
}); |
|
920 |
checkWMTE(() -> { // primitive class |
|
921 |
boolean x = (boolean) vh.getOpaque(); |
|
922 |
}); |
|
923 |
checkWMTE(() -> { // > |
|
924 |
float x = (float) vh.getOpaque(Void.class); |
|
925 |
}); |
|
926 |
||
927 |
||
928 |
// SetOpaque |
|
929 |
// Incorrect argument types |
|
930 |
checkWMTE(() -> { // value reference class |
|
931 |
vh.setOpaque(Void.class); |
|
932 |
}); |
|
933 |
// Incorrect arity |
|
934 |
checkWMTE(() -> { // 0 |
|
935 |
vh.setOpaque(); |
|
936 |
}); |
|
937 |
checkWMTE(() -> { // > |
|
938 |
vh.setOpaque(1.0f, Void.class); |
|
939 |
}); |
|
940 |
||
941 |
||
942 |
// GetAcquire |
|
943 |
// Incorrect return type |
|
944 |
checkWMTE(() -> { // reference class |
|
945 |
Void x = (Void) vh.getAcquire(); |
|
946 |
}); |
|
947 |
checkWMTE(() -> { // primitive class |
|
948 |
boolean x = (boolean) vh.getAcquire(); |
|
949 |
}); |
|
950 |
checkWMTE(() -> { // > |
|
951 |
float x = (float) vh.getAcquire(Void.class); |
|
952 |
}); |
|
953 |
||
954 |
||
955 |
// SetRelease |
|
956 |
// Incorrect argument types |
|
957 |
checkWMTE(() -> { // value reference class |
|
958 |
vh.setRelease(Void.class); |
|
959 |
}); |
|
960 |
// Incorrect arity |
|
961 |
checkWMTE(() -> { // 0 |
|
962 |
vh.setRelease(); |
|
963 |
}); |
|
964 |
checkWMTE(() -> { // > |
|
965 |
vh.setRelease(1.0f, Void.class); |
|
966 |
}); |
|
967 |
||
968 |
||
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
969 |
// CompareAndSet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
970 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
971 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
972 |
boolean r = vh.compareAndSet(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
973 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
974 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
975 |
boolean r = vh.compareAndSet(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
976 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
977 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
978 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
979 |
boolean r = vh.compareAndSet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
980 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
981 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
982 |
boolean r = vh.compareAndSet(1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
983 |
}); |
36934 | 984 |
|
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
985 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
986 |
// WeakCompareAndSet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
987 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
988 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
989 |
boolean r = vh.weakCompareAndSet(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
990 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
991 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
992 |
boolean r = vh.weakCompareAndSet(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
993 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
994 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
995 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
996 |
boolean r = vh.weakCompareAndSet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
997 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
998 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
999 |
boolean r = vh.weakCompareAndSet(1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1000 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1001 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1002 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1003 |
// WeakCompareAndSetVolatile |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1004 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1005 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1006 |
boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1007 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1008 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1009 |
boolean r = vh.weakCompareAndSetVolatile(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1010 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1011 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1012 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1013 |
boolean r = vh.weakCompareAndSetVolatile(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1014 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1015 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1016 |
boolean r = vh.weakCompareAndSetVolatile(1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1017 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1018 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1019 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1020 |
// WeakCompareAndSetAcquire |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1021 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1022 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1023 |
boolean r = vh.weakCompareAndSetAcquire(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1024 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1025 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1026 |
boolean r = vh.weakCompareAndSetAcquire(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1027 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1028 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1029 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1030 |
boolean r = vh.weakCompareAndSetAcquire(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1031 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1032 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1033 |
boolean r = vh.weakCompareAndSetAcquire(1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1034 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1035 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1036 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1037 |
// WeakCompareAndSetRelease |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1038 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1039 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1040 |
boolean r = vh.weakCompareAndSetRelease(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1041 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1042 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1043 |
boolean r = vh.weakCompareAndSetRelease(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1044 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1045 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1046 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1047 |
boolean r = vh.weakCompareAndSetRelease(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1048 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1049 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1050 |
boolean r = vh.weakCompareAndSetRelease(1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1051 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1052 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1053 |
|
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1054 |
// CompareAndExchange |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1055 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1056 |
checkWMTE(() -> { // expected reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1057 |
float x = (float) vh.compareAndExchange(Void.class, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1058 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1059 |
checkWMTE(() -> { // actual reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1060 |
float x = (float) vh.compareAndExchange(1.0f, Void.class); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1061 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1062 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1063 |
checkWMTE(() -> { // reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1064 |
Void r = (Void) vh.compareAndExchange(1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1065 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1066 |
checkWMTE(() -> { // primitive class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1067 |
boolean x = (boolean) vh.compareAndExchange(1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1068 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1069 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1070 |
checkWMTE(() -> { // 0 |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1071 |
float x = (float) vh.compareAndExchange(); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1072 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1073 |
checkWMTE(() -> { // > |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1074 |
float x = (float) vh.compareAndExchange(1.0f, 1.0f, Void.class); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1075 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1076 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1077 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1078 |
// CompareAndExchangeAcquire |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1079 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1080 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1081 |
float x = (float) vh.compareAndExchangeAcquire(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1082 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1083 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1084 |
float x = (float) vh.compareAndExchangeAcquire(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1085 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1086 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1087 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1088 |
Void r = (Void) vh.compareAndExchangeAcquire(1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1089 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1090 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1091 |
boolean x = (boolean) vh.compareAndExchangeAcquire(1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1092 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1093 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1094 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1095 |
float x = (float) vh.compareAndExchangeAcquire(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1096 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1097 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1098 |
float x = (float) vh.compareAndExchangeAcquire(1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1099 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1100 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1101 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1102 |
// CompareAndExchangeRelease |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1103 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1104 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1105 |
float x = (float) vh.compareAndExchangeRelease(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1106 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1107 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1108 |
float x = (float) vh.compareAndExchangeRelease(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1109 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1110 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1111 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1112 |
Void r = (Void) vh.compareAndExchangeRelease(1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1113 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1114 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1115 |
boolean x = (boolean) vh.compareAndExchangeRelease(1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1116 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1117 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1118 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1119 |
float x = (float) vh.compareAndExchangeRelease(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1120 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1121 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1122 |
float x = (float) vh.compareAndExchangeRelease(1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1123 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1124 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1125 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1126 |
// GetAndSet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1127 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1128 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1129 |
float x = (float) vh.getAndSet(Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1130 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1131 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1132 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1133 |
Void r = (Void) vh.getAndSet(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1134 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1135 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1136 |
boolean x = (boolean) vh.getAndSet(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1137 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1138 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1139 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1140 |
float x = (float) vh.getAndSet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1141 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1142 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1143 |
float x = (float) vh.getAndSet(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1144 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1145 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1146 |
// GetAndAdd |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1147 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1148 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1149 |
float x = (float) vh.getAndAdd(Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1150 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1151 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1152 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1153 |
Void r = (Void) vh.getAndAdd(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1154 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1155 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1156 |
boolean x = (boolean) vh.getAndAdd(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1157 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1158 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1159 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1160 |
float x = (float) vh.getAndAdd(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1161 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1162 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1163 |
float x = (float) vh.getAndAdd(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1164 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1165 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1166 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1167 |
// AddAndGet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1168 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1169 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1170 |
float x = (float) vh.addAndGet(Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1171 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1172 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1173 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1174 |
Void r = (Void) vh.addAndGet(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1175 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1176 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1177 |
boolean x = (boolean) vh.addAndGet(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1178 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1179 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1180 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1181 |
float x = (float) vh.addAndGet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1182 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1183 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1184 |
float x = (float) vh.addAndGet(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1185 |
}); |
36934 | 1186 |
} |
1187 |
||
1188 |
static void testStaticFieldWrongMethodType(Handles hs) throws Throwable { |
|
1189 |
int i = 0; |
|
1190 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
1191 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET)) { |
36934 | 1192 |
// Incorrect return type |
1193 |
checkWMTE(() -> { // reference class |
|
1194 |
Void x = (Void) hs.get(am, methodType(Void.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1195 |
invokeExact(); |
36934 | 1196 |
}); |
1197 |
checkWMTE(() -> { // primitive class |
|
1198 |
boolean x = (boolean) hs.get(am, methodType(boolean.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1199 |
invokeExact(); |
36934 | 1200 |
}); |
1201 |
// Incorrect arity |
|
1202 |
checkWMTE(() -> { // > |
|
1203 |
float x = (float) hs.get(am, methodType(Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1204 |
invokeExact(Void.class); |
36934 | 1205 |
}); |
1206 |
} |
|
1207 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
1208 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.SET)) { |
36934 | 1209 |
checkWMTE(() -> { // value reference class |
1210 |
hs.get(am, methodType(void.class, Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1211 |
invokeExact(Void.class); |
36934 | 1212 |
}); |
1213 |
// Incorrect arity |
|
1214 |
checkWMTE(() -> { // 0 |
|
1215 |
hs.get(am, methodType(void.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1216 |
invokeExact(); |
36934 | 1217 |
}); |
1218 |
checkWMTE(() -> { // > |
|
1219 |
hs.get(am, methodType(void.class, float.class, Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1220 |
invokeExact(1.0f, Void.class); |
36934 | 1221 |
}); |
1222 |
} |
|
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1223 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1224 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1225 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1226 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1227 |
invokeExact(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1228 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1229 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1230 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1231 |
invokeExact(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1232 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1233 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1234 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1235 |
boolean r = (boolean) hs.get(am, methodType(boolean.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1236 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1237 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1238 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1239 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, float.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1240 |
invokeExact(1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1241 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1242 |
} |
36934 | 1243 |
|
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1244 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1245 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1246 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1247 |
float x = (float) hs.get(am, methodType(float.class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1248 |
invokeExact(Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1249 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1250 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1251 |
float x = (float) hs.get(am, methodType(float.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1252 |
invokeExact(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1253 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1254 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1255 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1256 |
Void r = (Void) hs.get(am, methodType(Void.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1257 |
invokeExact(1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1258 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1259 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1260 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1261 |
invokeExact(1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1262 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1263 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1264 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1265 |
float x = (float) hs.get(am, methodType(float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1266 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1267 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1268 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1269 |
float x = (float) hs.get(am, methodType(float.class, float.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1270 |
invokeExact(1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1271 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1272 |
} |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1273 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1274 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1275 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1276 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1277 |
float x = (float) hs.get(am, methodType(float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1278 |
invokeExact(Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1279 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1280 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1281 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1282 |
Void r = (Void) hs.get(am, methodType(Void.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1283 |
invokeExact(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1284 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1285 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1286 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1287 |
invokeExact(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1288 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1289 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1290 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1291 |
float x = (float) hs.get(am, methodType(float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1292 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1293 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1294 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1295 |
float x = (float) hs.get(am, methodType(float.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1296 |
invokeExact(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1297 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1298 |
} |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1299 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1300 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1301 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1302 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1303 |
float x = (float) hs.get(am, methodType(float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1304 |
invokeExact(Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1305 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1306 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1307 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1308 |
Void r = (Void) hs.get(am, methodType(Void.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1309 |
invokeExact(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1310 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1311 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1312 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1313 |
invokeExact(1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1314 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1315 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1316 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1317 |
float x = (float) hs.get(am, methodType(float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1318 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1319 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1320 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1321 |
float x = (float) hs.get(am, methodType(float.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1322 |
invokeExact(1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1323 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1324 |
} |
36934 | 1325 |
} |
1326 |
||
1327 |
||
1328 |
static void testArrayWrongMethodType(VarHandle vh) throws Throwable { |
|
1329 |
float[] array = new float[10]; |
|
1330 |
Arrays.fill(array, 1.0f); |
|
1331 |
||
1332 |
// Get |
|
1333 |
// Incorrect argument types |
|
1334 |
checkNPE(() -> { // null array |
|
1335 |
float x = (float) vh.get(null, 0); |
|
1336 |
}); |
|
1337 |
checkCCE(() -> { // array reference class |
|
1338 |
float x = (float) vh.get(Void.class, 0); |
|
1339 |
}); |
|
1340 |
checkWMTE(() -> { // array primitive class |
|
1341 |
float x = (float) vh.get(0, 0); |
|
1342 |
}); |
|
1343 |
checkWMTE(() -> { // index reference class |
|
1344 |
float x = (float) vh.get(array, Void.class); |
|
1345 |
}); |
|
1346 |
// Incorrect return type |
|
1347 |
checkWMTE(() -> { // reference class |
|
1348 |
Void x = (Void) vh.get(array, 0); |
|
1349 |
}); |
|
1350 |
checkWMTE(() -> { // primitive class |
|
1351 |
boolean x = (boolean) vh.get(array, 0); |
|
1352 |
}); |
|
1353 |
// Incorrect arity |
|
1354 |
checkWMTE(() -> { // 0 |
|
1355 |
float x = (float) vh.get(); |
|
1356 |
}); |
|
1357 |
checkWMTE(() -> { // > |
|
1358 |
float x = (float) vh.get(array, 0, Void.class); |
|
1359 |
}); |
|
1360 |
||
1361 |
||
1362 |
// Set |
|
1363 |
// Incorrect argument types |
|
1364 |
checkNPE(() -> { // null array |
|
1365 |
vh.set(null, 0, 1.0f); |
|
1366 |
}); |
|
1367 |
checkCCE(() -> { // array reference class |
|
1368 |
vh.set(Void.class, 0, 1.0f); |
|
1369 |
}); |
|
1370 |
checkWMTE(() -> { // value reference class |
|
1371 |
vh.set(array, 0, Void.class); |
|
1372 |
}); |
|
1373 |
checkWMTE(() -> { // receiver primitive class |
|
1374 |
vh.set(0, 0, 1.0f); |
|
1375 |
}); |
|
1376 |
checkWMTE(() -> { // index reference class |
|
1377 |
vh.set(array, Void.class, 1.0f); |
|
1378 |
}); |
|
1379 |
// Incorrect arity |
|
1380 |
checkWMTE(() -> { // 0 |
|
1381 |
vh.set(); |
|
1382 |
}); |
|
1383 |
checkWMTE(() -> { // > |
|
1384 |
vh.set(array, 0, 1.0f, Void.class); |
|
1385 |
}); |
|
1386 |
||
1387 |
||
1388 |
// GetVolatile |
|
1389 |
// Incorrect argument types |
|
1390 |
checkNPE(() -> { // null array |
|
1391 |
float x = (float) vh.getVolatile(null, 0); |
|
1392 |
}); |
|
1393 |
checkCCE(() -> { // array reference class |
|
1394 |
float x = (float) vh.getVolatile(Void.class, 0); |
|
1395 |
}); |
|
1396 |
checkWMTE(() -> { // array primitive class |
|
1397 |
float x = (float) vh.getVolatile(0, 0); |
|
1398 |
}); |
|
1399 |
checkWMTE(() -> { // index reference class |
|
1400 |
float x = (float) vh.getVolatile(array, Void.class); |
|
1401 |
}); |
|
1402 |
// Incorrect return type |
|
1403 |
checkWMTE(() -> { // reference class |
|
1404 |
Void x = (Void) vh.getVolatile(array, 0); |
|
1405 |
}); |
|
1406 |
checkWMTE(() -> { // primitive class |
|
1407 |
boolean x = (boolean) vh.getVolatile(array, 0); |
|
1408 |
}); |
|
1409 |
// Incorrect arity |
|
1410 |
checkWMTE(() -> { // 0 |
|
1411 |
float x = (float) vh.getVolatile(); |
|
1412 |
}); |
|
1413 |
checkWMTE(() -> { // > |
|
1414 |
float x = (float) vh.getVolatile(array, 0, Void.class); |
|
1415 |
}); |
|
1416 |
||
1417 |
||
1418 |
// SetVolatile |
|
1419 |
// Incorrect argument types |
|
1420 |
checkNPE(() -> { // null array |
|
1421 |
vh.setVolatile(null, 0, 1.0f); |
|
1422 |
}); |
|
1423 |
checkCCE(() -> { // array reference class |
|
1424 |
vh.setVolatile(Void.class, 0, 1.0f); |
|
1425 |
}); |
|
1426 |
checkWMTE(() -> { // value reference class |
|
1427 |
vh.setVolatile(array, 0, Void.class); |
|
1428 |
}); |
|
1429 |
checkWMTE(() -> { // receiver primitive class |
|
1430 |
vh.setVolatile(0, 0, 1.0f); |
|
1431 |
}); |
|
1432 |
checkWMTE(() -> { // index reference class |
|
1433 |
vh.setVolatile(array, Void.class, 1.0f); |
|
1434 |
}); |
|
1435 |
// Incorrect arity |
|
1436 |
checkWMTE(() -> { // 0 |
|
1437 |
vh.setVolatile(); |
|
1438 |
}); |
|
1439 |
checkWMTE(() -> { // > |
|
1440 |
vh.setVolatile(array, 0, 1.0f, Void.class); |
|
1441 |
}); |
|
1442 |
||
1443 |
||
1444 |
// GetOpaque |
|
1445 |
// Incorrect argument types |
|
1446 |
checkNPE(() -> { // null array |
|
1447 |
float x = (float) vh.getOpaque(null, 0); |
|
1448 |
}); |
|
1449 |
checkCCE(() -> { // array reference class |
|
1450 |
float x = (float) vh.getOpaque(Void.class, 0); |
|
1451 |
}); |
|
1452 |
checkWMTE(() -> { // array primitive class |
|
1453 |
float x = (float) vh.getOpaque(0, 0); |
|
1454 |
}); |
|
1455 |
checkWMTE(() -> { // index reference class |
|
1456 |
float x = (float) vh.getOpaque(array, Void.class); |
|
1457 |
}); |
|
1458 |
// Incorrect return type |
|
1459 |
checkWMTE(() -> { // reference class |
|
1460 |
Void x = (Void) vh.getOpaque(array, 0); |
|
1461 |
}); |
|
1462 |
checkWMTE(() -> { // primitive class |
|
1463 |
boolean x = (boolean) vh.getOpaque(array, 0); |
|
1464 |
}); |
|
1465 |
// Incorrect arity |
|
1466 |
checkWMTE(() -> { // 0 |
|
1467 |
float x = (float) vh.getOpaque(); |
|
1468 |
}); |
|
1469 |
checkWMTE(() -> { // > |
|
1470 |
float x = (float) vh.getOpaque(array, 0, Void.class); |
|
1471 |
}); |
|
1472 |
||
1473 |
||
1474 |
// SetOpaque |
|
1475 |
// Incorrect argument types |
|
1476 |
checkNPE(() -> { // null array |
|
1477 |
vh.setOpaque(null, 0, 1.0f); |
|
1478 |
}); |
|
1479 |
checkCCE(() -> { // array reference class |
|
1480 |
vh.setOpaque(Void.class, 0, 1.0f); |
|
1481 |
}); |
|
1482 |
checkWMTE(() -> { // value reference class |
|
1483 |
vh.setOpaque(array, 0, Void.class); |
|
1484 |
}); |
|
1485 |
checkWMTE(() -> { // receiver primitive class |
|
1486 |
vh.setOpaque(0, 0, 1.0f); |
|
1487 |
}); |
|
1488 |
checkWMTE(() -> { // index reference class |
|
1489 |
vh.setOpaque(array, Void.class, 1.0f); |
|
1490 |
}); |
|
1491 |
// Incorrect arity |
|
1492 |
checkWMTE(() -> { // 0 |
|
1493 |
vh.setOpaque(); |
|
1494 |
}); |
|
1495 |
checkWMTE(() -> { // > |
|
1496 |
vh.setOpaque(array, 0, 1.0f, Void.class); |
|
1497 |
}); |
|
1498 |
||
1499 |
||
1500 |
// GetAcquire |
|
1501 |
// Incorrect argument types |
|
1502 |
checkNPE(() -> { // null array |
|
1503 |
float x = (float) vh.getAcquire(null, 0); |
|
1504 |
}); |
|
1505 |
checkCCE(() -> { // array reference class |
|
1506 |
float x = (float) vh.getAcquire(Void.class, 0); |
|
1507 |
}); |
|
1508 |
checkWMTE(() -> { // array primitive class |
|
1509 |
float x = (float) vh.getAcquire(0, 0); |
|
1510 |
}); |
|
1511 |
checkWMTE(() -> { // index reference class |
|
1512 |
float x = (float) vh.getAcquire(array, Void.class); |
|
1513 |
}); |
|
1514 |
// Incorrect return type |
|
1515 |
checkWMTE(() -> { // reference class |
|
1516 |
Void x = (Void) vh.getAcquire(array, 0); |
|
1517 |
}); |
|
1518 |
checkWMTE(() -> { // primitive class |
|
1519 |
boolean x = (boolean) vh.getAcquire(array, 0); |
|
1520 |
}); |
|
1521 |
// Incorrect arity |
|
1522 |
checkWMTE(() -> { // 0 |
|
1523 |
float x = (float) vh.getAcquire(); |
|
1524 |
}); |
|
1525 |
checkWMTE(() -> { // > |
|
1526 |
float x = (float) vh.getAcquire(array, 0, Void.class); |
|
1527 |
}); |
|
1528 |
||
1529 |
||
1530 |
// SetRelease |
|
1531 |
// Incorrect argument types |
|
1532 |
checkNPE(() -> { // null array |
|
1533 |
vh.setRelease(null, 0, 1.0f); |
|
1534 |
}); |
|
1535 |
checkCCE(() -> { // array reference class |
|
1536 |
vh.setRelease(Void.class, 0, 1.0f); |
|
1537 |
}); |
|
1538 |
checkWMTE(() -> { // value reference class |
|
1539 |
vh.setRelease(array, 0, Void.class); |
|
1540 |
}); |
|
1541 |
checkWMTE(() -> { // receiver primitive class |
|
1542 |
vh.setRelease(0, 0, 1.0f); |
|
1543 |
}); |
|
1544 |
checkWMTE(() -> { // index reference class |
|
1545 |
vh.setRelease(array, Void.class, 1.0f); |
|
1546 |
}); |
|
1547 |
// Incorrect arity |
|
1548 |
checkWMTE(() -> { // 0 |
|
1549 |
vh.setRelease(); |
|
1550 |
}); |
|
1551 |
checkWMTE(() -> { // > |
|
1552 |
vh.setRelease(array, 0, 1.0f, Void.class); |
|
1553 |
}); |
|
1554 |
||
1555 |
||
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1556 |
// CompareAndSet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1557 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1558 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1559 |
boolean r = vh.compareAndSet(null, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1560 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1561 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1562 |
boolean r = vh.compareAndSet(Void.class, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1563 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1564 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1565 |
boolean r = vh.compareAndSet(array, 0, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1566 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1567 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1568 |
boolean r = vh.compareAndSet(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1569 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1570 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1571 |
boolean r = vh.compareAndSet(0, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1572 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1573 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1574 |
boolean r = vh.compareAndSet(array, Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1575 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1576 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1577 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1578 |
boolean r = vh.compareAndSet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1579 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1580 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1581 |
boolean r = vh.compareAndSet(array, 0, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1582 |
}); |
36934 | 1583 |
|
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1584 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1585 |
// WeakCompareAndSet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1586 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1587 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1588 |
boolean r = vh.weakCompareAndSet(null, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1589 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1590 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1591 |
boolean r = vh.weakCompareAndSet(Void.class, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1592 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1593 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1594 |
boolean r = vh.weakCompareAndSet(array, 0, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1595 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1596 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1597 |
boolean r = vh.weakCompareAndSet(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1598 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1599 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1600 |
boolean r = vh.weakCompareAndSet(0, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1601 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1602 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1603 |
boolean r = vh.weakCompareAndSet(array, Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1604 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1605 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1606 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1607 |
boolean r = vh.weakCompareAndSet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1608 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1609 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1610 |
boolean r = vh.weakCompareAndSet(array, 0, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1611 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1612 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1613 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1614 |
// WeakCompareAndSetVolatile |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1615 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1616 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1617 |
boolean r = vh.weakCompareAndSetVolatile(null, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1618 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1619 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1620 |
boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1621 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1622 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1623 |
boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1624 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1625 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1626 |
boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1627 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1628 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1629 |
boolean r = vh.weakCompareAndSetVolatile(0, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1630 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1631 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1632 |
boolean r = vh.weakCompareAndSetVolatile(array, Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1633 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1634 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1635 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1636 |
boolean r = vh.weakCompareAndSetVolatile(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1637 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1638 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1639 |
boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1640 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1641 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1642 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1643 |
// WeakCompareAndSetAcquire |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1644 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1645 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1646 |
boolean r = vh.weakCompareAndSetAcquire(null, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1647 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1648 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1649 |
boolean r = vh.weakCompareAndSetAcquire(Void.class, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1650 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1651 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1652 |
boolean r = vh.weakCompareAndSetAcquire(array, 0, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1653 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1654 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1655 |
boolean r = vh.weakCompareAndSetAcquire(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1656 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1657 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1658 |
boolean r = vh.weakCompareAndSetAcquire(0, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1659 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1660 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1661 |
boolean r = vh.weakCompareAndSetAcquire(array, Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1662 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1663 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1664 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1665 |
boolean r = vh.weakCompareAndSetAcquire(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1666 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1667 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1668 |
boolean r = vh.weakCompareAndSetAcquire(array, 0, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1669 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1670 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1671 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1672 |
// WeakCompareAndSetRelease |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1673 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1674 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1675 |
boolean r = vh.weakCompareAndSetRelease(null, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1676 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1677 |
checkCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1678 |
boolean r = vh.weakCompareAndSetRelease(Void.class, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1679 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1680 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1681 |
boolean r = vh.weakCompareAndSetRelease(array, 0, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1682 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1683 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1684 |
boolean r = vh.weakCompareAndSetRelease(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1685 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1686 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1687 |
boolean r = vh.weakCompareAndSetRelease(0, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1688 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1689 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1690 |
boolean r = vh.weakCompareAndSetRelease(array, Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1691 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1692 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1693 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1694 |
boolean r = vh.weakCompareAndSetRelease(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1695 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1696 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1697 |
boolean r = vh.weakCompareAndSetRelease(array, 0, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1698 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1699 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1700 |
|
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1701 |
// CompareAndExchange |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1702 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1703 |
checkNPE(() -> { // null receiver |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1704 |
float x = (float) vh.compareAndExchange(null, 0, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1705 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1706 |
checkCCE(() -> { // array reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1707 |
float x = (float) vh.compareAndExchange(Void.class, 0, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1708 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1709 |
checkWMTE(() -> { // expected reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1710 |
float x = (float) vh.compareAndExchange(array, 0, Void.class, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1711 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1712 |
checkWMTE(() -> { // actual reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1713 |
float x = (float) vh.compareAndExchange(array, 0, 1.0f, Void.class); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1714 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1715 |
checkWMTE(() -> { // array primitive class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1716 |
float x = (float) vh.compareAndExchange(0, 0, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1717 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1718 |
checkWMTE(() -> { // index reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1719 |
float x = (float) vh.compareAndExchange(array, Void.class, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1720 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1721 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1722 |
checkWMTE(() -> { // reference class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1723 |
Void r = (Void) vh.compareAndExchange(array, 0, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1724 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1725 |
checkWMTE(() -> { // primitive class |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1726 |
boolean x = (boolean) vh.compareAndExchange(array, 0, 1.0f, 1.0f); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1727 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1728 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1729 |
checkWMTE(() -> { // 0 |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1730 |
float x = (float) vh.compareAndExchange(); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1731 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1732 |
checkWMTE(() -> { // > |
39472
6df82f4c63ac
8154737: Rename VarHandle.compareAndExchangeVolatile to VarHandle.compareAndExchange
psandoz
parents:
39471
diff
changeset
|
1733 |
float x = (float) vh.compareAndExchange(array, 0, 1.0f, 1.0f, Void.class); |
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1734 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1735 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1736 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1737 |
// CompareAndExchangeAcquire |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1738 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1739 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1740 |
float x = (float) vh.compareAndExchangeAcquire(null, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1741 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1742 |
checkCCE(() -> { // array reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1743 |
float x = (float) vh.compareAndExchangeAcquire(Void.class, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1744 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1745 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1746 |
float x = (float) vh.compareAndExchangeAcquire(array, 0, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1747 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1748 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1749 |
float x = (float) vh.compareAndExchangeAcquire(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1750 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1751 |
checkWMTE(() -> { // array primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1752 |
float x = (float) vh.compareAndExchangeAcquire(0, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1753 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1754 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1755 |
float x = (float) vh.compareAndExchangeAcquire(array, Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1756 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1757 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1758 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1759 |
Void r = (Void) vh.compareAndExchangeAcquire(array, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1760 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1761 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1762 |
boolean x = (boolean) vh.compareAndExchangeAcquire(array, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1763 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1764 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1765 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1766 |
float x = (float) vh.compareAndExchangeAcquire(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1767 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1768 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1769 |
float x = (float) vh.compareAndExchangeAcquire(array, 0, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1770 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1771 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1772 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1773 |
// CompareAndExchangeRelease |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1774 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1775 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1776 |
float x = (float) vh.compareAndExchangeRelease(null, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1777 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1778 |
checkCCE(() -> { // array reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1779 |
float x = (float) vh.compareAndExchangeRelease(Void.class, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1780 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1781 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1782 |
float x = (float) vh.compareAndExchangeRelease(array, 0, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1783 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1784 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1785 |
float x = (float) vh.compareAndExchangeRelease(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1786 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1787 |
checkWMTE(() -> { // array primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1788 |
float x = (float) vh.compareAndExchangeRelease(0, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1789 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1790 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1791 |
float x = (float) vh.compareAndExchangeRelease(array, Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1792 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1793 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1794 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1795 |
Void r = (Void) vh.compareAndExchangeRelease(array, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1796 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1797 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1798 |
boolean x = (boolean) vh.compareAndExchangeRelease(array, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1799 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1800 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1801 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1802 |
float x = (float) vh.compareAndExchangeRelease(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1803 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1804 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1805 |
float x = (float) vh.compareAndExchangeRelease(array, 0, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1806 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1807 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1808 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1809 |
// GetAndSet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1810 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1811 |
checkNPE(() -> { // null array |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1812 |
float x = (float) vh.getAndSet(null, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1813 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1814 |
checkCCE(() -> { // array reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1815 |
float x = (float) vh.getAndSet(Void.class, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1816 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1817 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1818 |
float x = (float) vh.getAndSet(array, 0, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1819 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1820 |
checkWMTE(() -> { // reciarrayever primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1821 |
float x = (float) vh.getAndSet(0, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1822 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1823 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1824 |
float x = (float) vh.getAndSet(array, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1825 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1826 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1827 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1828 |
Void r = (Void) vh.getAndSet(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1829 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1830 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1831 |
boolean x = (boolean) vh.getAndSet(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1832 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1833 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1834 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1835 |
float x = (float) vh.getAndSet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1836 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1837 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1838 |
float x = (float) vh.getAndSet(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1839 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1840 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1841 |
// GetAndAdd |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1842 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1843 |
checkNPE(() -> { // null array |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1844 |
float x = (float) vh.getAndAdd(null, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1845 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1846 |
checkCCE(() -> { // array reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1847 |
float x = (float) vh.getAndAdd(Void.class, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1848 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1849 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1850 |
float x = (float) vh.getAndAdd(array, 0, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1851 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1852 |
checkWMTE(() -> { // array primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1853 |
float x = (float) vh.getAndAdd(0, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1854 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1855 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1856 |
float x = (float) vh.getAndAdd(array, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1857 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1858 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1859 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1860 |
Void r = (Void) vh.getAndAdd(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1861 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1862 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1863 |
boolean x = (boolean) vh.getAndAdd(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1864 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1865 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1866 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1867 |
float x = (float) vh.getAndAdd(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1868 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1869 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1870 |
float x = (float) vh.getAndAdd(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1871 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1872 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1873 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1874 |
// AddAndGet |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1875 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1876 |
checkNPE(() -> { // null array |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1877 |
float x = (float) vh.addAndGet(null, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1878 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1879 |
checkCCE(() -> { // array reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1880 |
float x = (float) vh.addAndGet(Void.class, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1881 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1882 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1883 |
float x = (float) vh.addAndGet(array, 0, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1884 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1885 |
checkWMTE(() -> { // array primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1886 |
float x = (float) vh.addAndGet(0, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1887 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1888 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1889 |
float x = (float) vh.addAndGet(array, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1890 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1891 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1892 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1893 |
Void r = (Void) vh.addAndGet(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1894 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1895 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1896 |
boolean x = (boolean) vh.addAndGet(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1897 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1898 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1899 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1900 |
float x = (float) vh.addAndGet(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1901 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1902 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1903 |
float x = (float) vh.addAndGet(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1904 |
}); |
36934 | 1905 |
} |
1906 |
||
1907 |
static void testArrayWrongMethodType(Handles hs) throws Throwable { |
|
1908 |
float[] array = new float[10]; |
|
1909 |
Arrays.fill(array, 1.0f); |
|
1910 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
1911 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET)) { |
36934 | 1912 |
// Incorrect argument types |
1913 |
checkNPE(() -> { // null array |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1914 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class)). |
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1915 |
invokeExact((float[]) null, 0); |
36934 | 1916 |
}); |
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1917 |
hs.checkWMTEOrCCE(() -> { // array reference class |
36934 | 1918 |
float x = (float) hs.get(am, methodType(float.class, Class.class, int.class)). |
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1919 |
invokeExact(Void.class, 0); |
36934 | 1920 |
}); |
1921 |
checkWMTE(() -> { // array primitive class |
|
1922 |
float x = (float) hs.get(am, methodType(float.class, int.class, int.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1923 |
invokeExact(0, 0); |
36934 | 1924 |
}); |
1925 |
checkWMTE(() -> { // index reference class |
|
1926 |
float x = (float) hs.get(am, methodType(float.class, float[].class, Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1927 |
invokeExact(array, Void.class); |
36934 | 1928 |
}); |
1929 |
// Incorrect return type |
|
1930 |
checkWMTE(() -> { // reference class |
|
1931 |
Void x = (Void) hs.get(am, methodType(Void.class, float[].class, int.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1932 |
invokeExact(array, 0); |
36934 | 1933 |
}); |
1934 |
checkWMTE(() -> { // primitive class |
|
1935 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, float[].class, int.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1936 |
invokeExact(array, 0); |
36934 | 1937 |
}); |
1938 |
// Incorrect arity |
|
1939 |
checkWMTE(() -> { // 0 |
|
1940 |
float x = (float) hs.get(am, methodType(float.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1941 |
invokeExact(); |
36934 | 1942 |
}); |
1943 |
checkWMTE(() -> { // > |
|
1944 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1945 |
invokeExact(array, 0, Void.class); |
36934 | 1946 |
}); |
1947 |
} |
|
1948 |
||
37343
35a2231828a7
8151705: VarHandle.AccessMode enum names should conform to code style
psandoz
parents:
36934
diff
changeset
|
1949 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.SET)) { |
36934 | 1950 |
// Incorrect argument types |
1951 |
checkNPE(() -> { // null array |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1952 |
hs.get(am, methodType(void.class, float[].class, int.class, float.class)). |
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1953 |
invokeExact((float[]) null, 0, 1.0f); |
36934 | 1954 |
}); |
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1955 |
hs.checkWMTEOrCCE(() -> { // array reference class |
36934 | 1956 |
hs.get(am, methodType(void.class, Class.class, int.class, float.class)). |
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1957 |
invokeExact(Void.class, 0, 1.0f); |
36934 | 1958 |
}); |
1959 |
checkWMTE(() -> { // value reference class |
|
1960 |
hs.get(am, methodType(void.class, float[].class, int.class, Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1961 |
invokeExact(array, 0, Void.class); |
36934 | 1962 |
}); |
1963 |
checkWMTE(() -> { // receiver primitive class |
|
1964 |
hs.get(am, methodType(void.class, int.class, int.class, float.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1965 |
invokeExact(0, 0, 1.0f); |
36934 | 1966 |
}); |
1967 |
checkWMTE(() -> { // index reference class |
|
1968 |
hs.get(am, methodType(void.class, float[].class, Class.class, float.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1969 |
invokeExact(array, Void.class, 1.0f); |
36934 | 1970 |
}); |
1971 |
// Incorrect arity |
|
1972 |
checkWMTE(() -> { // 0 |
|
1973 |
hs.get(am, methodType(void.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1974 |
invokeExact(); |
36934 | 1975 |
}); |
1976 |
checkWMTE(() -> { // > |
|
1977 |
hs.get(am, methodType(void.class, float[].class, int.class, Class.class)). |
|
38328
40435a469d25
8156485: MethodHandles.varHandleExactInvoker should perform exact checks
psandoz
parents:
37343
diff
changeset
|
1978 |
invokeExact(array, 0, 1.0f, Void.class); |
36934 | 1979 |
}); |
1980 |
} |
|
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1981 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1982 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1983 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1984 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, float[].class, int.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1985 |
invokeExact((float[]) null, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1986 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1987 |
hs.checkWMTEOrCCE(() -> { // receiver reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1988 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1989 |
invokeExact(Void.class, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1990 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1991 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1992 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, float[].class, int.class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1993 |
invokeExact(array, 0, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1994 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1995 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1996 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, float[].class, int.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1997 |
invokeExact(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1998 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
1999 |
checkWMTE(() -> { // receiver primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2000 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2001 |
invokeExact(0, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2002 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2003 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2004 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, float[].class, Class.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2005 |
invokeExact(array, Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2006 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2007 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2008 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2009 |
boolean r = (boolean) hs.get(am, methodType(boolean.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2010 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2011 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2012 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2013 |
boolean r = (boolean) hs.get(am, methodType(boolean.class, float[].class, int.class, float.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2014 |
invokeExact(array, 0, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2015 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2016 |
} |
36934 | 2017 |
|
39471
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2018 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2019 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2020 |
checkNPE(() -> { // null receiver |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2021 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2022 |
invokeExact((float[]) null, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2023 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2024 |
hs.checkWMTEOrCCE(() -> { // array reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2025 |
float x = (float) hs.get(am, methodType(float.class, Class.class, int.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2026 |
invokeExact(Void.class, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2027 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2028 |
checkWMTE(() -> { // expected reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2029 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2030 |
invokeExact(array, 0, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2031 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2032 |
checkWMTE(() -> { // actual reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2033 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2034 |
invokeExact(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2035 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2036 |
checkWMTE(() -> { // array primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2037 |
float x = (float) hs.get(am, methodType(float.class, int.class, int.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2038 |
invokeExact(0, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2039 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2040 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2041 |
float x = (float) hs.get(am, methodType(float.class, float[].class, Class.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2042 |
invokeExact(array, Void.class, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2043 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2044 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2045 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2046 |
Void r = (Void) hs.get(am, methodType(Void.class, float[].class, int.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2047 |
invokeExact(array, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2048 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2049 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2050 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, float[].class, int.class, float.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2051 |
invokeExact(array, 0, 1.0f, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2052 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2053 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2054 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2055 |
float x = (float) hs.get(am, methodType(float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2056 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2057 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2058 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2059 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, float.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2060 |
invokeExact(array, 0, 1.0f, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2061 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2062 |
} |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2063 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2064 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2065 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2066 |
checkNPE(() -> { // null array |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2067 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2068 |
invokeExact((float[]) null, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2069 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2070 |
hs.checkWMTEOrCCE(() -> { // array reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2071 |
float x = (float) hs.get(am, methodType(float.class, Class.class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2072 |
invokeExact(Void.class, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2073 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2074 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2075 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2076 |
invokeExact(array, 0, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2077 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2078 |
checkWMTE(() -> { // array primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2079 |
float x = (float) hs.get(am, methodType(float.class, int.class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2080 |
invokeExact(0, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2081 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2082 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2083 |
float x = (float) hs.get(am, methodType(float.class, float[].class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2084 |
invokeExact(array, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2085 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2086 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2087 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2088 |
Void r = (Void) hs.get(am, methodType(Void.class, float[].class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2089 |
invokeExact(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2090 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2091 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2092 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, float[].class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2093 |
invokeExact(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2094 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2095 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2096 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2097 |
float x = (float) hs.get(am, methodType(float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2098 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2099 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2100 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2101 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2102 |
invokeExact(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2103 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2104 |
} |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2105 |
|
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2106 |
for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) { |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2107 |
// Incorrect argument types |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2108 |
checkNPE(() -> { // null array |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2109 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2110 |
invokeExact((float[]) null, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2111 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2112 |
hs.checkWMTEOrCCE(() -> { // array reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2113 |
float x = (float) hs.get(am, methodType(float.class, Class.class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2114 |
invokeExact(Void.class, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2115 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2116 |
checkWMTE(() -> { // value reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2117 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2118 |
invokeExact(array, 0, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2119 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2120 |
checkWMTE(() -> { // array primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2121 |
float x = (float) hs.get(am, methodType(float.class, int.class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2122 |
invokeExact(0, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2123 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2124 |
checkWMTE(() -> { // index reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2125 |
float x = (float) hs.get(am, methodType(float.class, float[].class, Class.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2126 |
invokeExact(array, Void.class, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2127 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2128 |
// Incorrect return type |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2129 |
checkWMTE(() -> { // reference class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2130 |
Void r = (Void) hs.get(am, methodType(Void.class, float[].class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2131 |
invokeExact(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2132 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2133 |
checkWMTE(() -> { // primitive class |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2134 |
boolean x = (boolean) hs.get(am, methodType(boolean.class, float[].class, int.class, float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2135 |
invokeExact(array, 0, 1.0f); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2136 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2137 |
// Incorrect arity |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2138 |
checkWMTE(() -> { // 0 |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2139 |
float x = (float) hs.get(am, methodType(float.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2140 |
invokeExact(); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2141 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2142 |
checkWMTE(() -> { // > |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2143 |
float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, float.class, Class.class)). |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2144 |
invokeExact(array, 0, 1.0f, Void.class); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2145 |
}); |
6622892a347a
8158039: VarHandle float/double field/array access should support CAS/set/add atomics
psandoz
parents:
38328
diff
changeset
|
2146 |
} |
36934 | 2147 |
} |
2148 |
} |
|
2149 |