RicochetTest.java revision 4279
2346N/A * @ignore The following test creates an unreasonable number of adapters in -Xcomp mode (7049122)
0N/Apublic class RicochetTest {
0N/A private static final int MAX_ARITY = Integer.getInteger(CLASS.getSimpleName()+".MAX_ARITY", 40);
0N/A if (test.testOnlyTests == null) throw new RuntimeException("no matching test: "+test.testOnly);
0N/A int testRepetition;
0N/A testBoxLong();
0N/A testReturns();
0N/A Object res = list8ints.invokeExact(ints[0], ints[1], ints[2], ints[3], ints[4], ints[5], ints[6], ints[7]);
0N/A res = idreturn.invokeExact(ints[0], ints[1], ints[2], ints[3], ints[4], ints[5], ints[6], ints[7]);
2346N/A case 5: args2 = (byte[]) coll.invokeExact(args[0], args[1], args[2], args[3], args[4]); break;
2346N/A final int MAX = (MAX_ARITY - 2) / 2; // 253/2+1 would cause parameter overflow with 'this' added
switch (nargs) {
@Test
//System.out.println("testIntCollects "+Arrays.asList(lister, pos, collector)+" on "+Arrays.toString(args));
private static MethodHandle collectArguments(MethodHandle lister, int pos, MethodHandle collector) {
return null;
@Test
if (ret != void.class) {
if (j == pos) continue;
return res;
assertEqualFunctionAt(i, x, y);
assertEqualFunctionAt(i, x, y);
private static void assertEqualFunctionAt(Object v, MethodHandle x, MethodHandle y) throws Throwable {
return ex;
stress();
for (int x : xs) {
private static final MethodHandle opI, opI2, opI3, opI4, opI_L, opJ, opJ2, opJ3, opL2, opL, opL2_I, opL_I, opL_J;
private static void stress() {
l.add(x);