2012-08-17 20:42:25 +00:00
|
|
|
/*
|
2013-12-26 20:04:16 +00:00
|
|
|
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
2012-08-17 20:42:25 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
2013-11-12 16:24:25 +00:00
|
|
|
* published by the Free Software Foundation.
|
2012-08-17 20:42:25 +00:00
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* @test
|
|
|
|
* @summary High arity invocations, up to the maximum of 255 arguments
|
|
|
|
* @compile BigArityTest.java
|
2012-11-05 17:51:14 +00:00
|
|
|
* @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies -esa -DBigArityTest.ITERATION_COUNT=1 test.java.lang.invoke.BigArityTest
|
2012-08-17 20:42:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
package test.java.lang.invoke;
|
|
|
|
|
|
|
|
import java.lang.invoke.MethodHandle;
|
|
|
|
import java.lang.invoke.MethodHandles;
|
|
|
|
import java.lang.invoke.MethodType;
|
|
|
|
import java.lang.invoke.WrongMethodTypeException;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.Objects;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
public class BigArityTest {
|
|
|
|
|
|
|
|
static MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
|
|
|
|
|
|
|
|
static final int MAX_JVM_ARITY = 255;
|
|
|
|
static final int ITERATION_COUNT = getProperty("ITERATION_COUNT", 40000);
|
|
|
|
static final int MIN_ARITY = getProperty("MIN_ARITY", 250);
|
|
|
|
static final int SLOW_ARITY = getProperty("SLOW_ARITY", MAX_JVM_ARITY-3);
|
|
|
|
static final int MAX_ARITY = getProperty("MAX_ARITY", MAX_JVM_ARITY-1); // always -1 for the MH reciever itself
|
|
|
|
private static int getProperty(String name, int dflt) {
|
|
|
|
return Integer.parseInt(getProperty(name, ""+dflt));
|
|
|
|
}
|
|
|
|
private static String getProperty(String name, String dflt) {
|
|
|
|
String x = System.getProperty(BigArityTest.class.getSimpleName() + "." + name);
|
|
|
|
if (x == null) x = System.getProperty(BigArityTest.class.getName() + "." + name);
|
|
|
|
return x == null ? dflt : x;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Object hashArguments(Object... args) {
|
|
|
|
return Objects.hash(args);
|
|
|
|
}
|
|
|
|
static final MethodHandle MH_hashArguments_VA;
|
|
|
|
static {
|
|
|
|
try {
|
|
|
|
MH_hashArguments_VA =
|
|
|
|
MethodHandles.lookup().unreflect(
|
|
|
|
BigArityTest.class.getDeclaredMethod("hashArguments", Object[].class));
|
|
|
|
} catch (ReflectiveOperationException ex) {
|
2012-10-20 00:04:35 +00:00
|
|
|
throw new Error(ex);
|
2012-08-17 20:42:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
static MethodHandle MH_hashArguments(int arity) {
|
|
|
|
MethodType mt = MethodType.genericMethodType(arity);
|
|
|
|
return MH_hashArguments_VA.asType(mt);
|
|
|
|
}
|
|
|
|
static MethodHandle MH_hashArguments(Class<? extends Object[]> arrayClass, int arity) {
|
|
|
|
if (arrayClass == Object[].class)
|
|
|
|
return MH_hashArguments(arity);
|
|
|
|
ArrayList<Class<?>> ptypes = new ArrayList<>(Collections.<Class<?>>nCopies(arity, arrayClass.getComponentType()));
|
|
|
|
MethodType mt = MethodType.methodType(Object.class, ptypes);
|
|
|
|
return MH_hashArguments_VA.asType(mt);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Object[] testArgs(int arity) {
|
|
|
|
Object args[] = new Object[arity];
|
|
|
|
for (int i = 0; i < arity; i++)
|
|
|
|
args[i] = i * (i + 1) / 2;
|
|
|
|
return args;
|
|
|
|
}
|
|
|
|
|
2013-10-05 12:30:39 +00:00
|
|
|
@Test
|
|
|
|
public void asCollectorIAE01() throws ReflectiveOperationException {
|
|
|
|
final int [] INVALID_ARRAY_LENGTHS = {
|
|
|
|
Integer.MIN_VALUE, Integer.MIN_VALUE + 1, -2, -1, 255, 256, Integer.MAX_VALUE - 1, Integer.MAX_VALUE
|
|
|
|
};
|
|
|
|
MethodHandle target = MethodHandles.publicLookup().findStatic(Arrays.class,
|
|
|
|
"deepToString", MethodType.methodType(String.class, Object[].class));
|
|
|
|
int minbig = Integer.MAX_VALUE;
|
|
|
|
for (int invalidLength : INVALID_ARRAY_LENGTHS) {
|
|
|
|
if (minbig > invalidLength && invalidLength > 100) minbig = invalidLength;
|
|
|
|
try {
|
|
|
|
target.asCollector(Object[].class, invalidLength);
|
|
|
|
assert(false) : invalidLength;
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Sizes not in the above array are good:
|
|
|
|
target.asCollector(Object[].class, minbig-1);
|
|
|
|
for (int i = 2; i <= 10; i++)
|
|
|
|
target.asCollector(Object[].class, minbig-i);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void invoker02() {
|
|
|
|
for (int i = 0; i < 255; i++) {
|
|
|
|
MethodType mt = MethodType.genericMethodType(i);
|
|
|
|
MethodType expMT = mt.insertParameterTypes(0, MethodHandle.class);
|
|
|
|
if (i < 254) {
|
|
|
|
assertEquals(expMT, MethodHandles.invoker(mt).type());
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
MethodHandles.invoker(mt);
|
|
|
|
assert(false) : i;
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void exactInvoker02() {
|
|
|
|
for (int i = 0; i < 255; i++) {
|
|
|
|
MethodType mt = MethodType.genericMethodType(i);
|
|
|
|
MethodType expMT = mt.insertParameterTypes(0, MethodHandle.class);
|
|
|
|
if (i < 254) {
|
|
|
|
assertEquals(expMT, MethodHandles.exactInvoker(mt).type());
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
MethodHandles.exactInvoker(mt);
|
|
|
|
assert(false) : i;
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-17 20:42:25 +00:00
|
|
|
@Test
|
|
|
|
public void testBoundaryValues() throws Throwable {
|
|
|
|
for (int badArity : new int[]{ -1, MAX_JVM_ARITY+1, MAX_JVM_ARITY }) {
|
|
|
|
try {
|
|
|
|
MethodHandle badmh = MH_hashArguments(badArity);
|
|
|
|
throw new AssertionError("should not be able to build a 255-arity MH: "+badmh);
|
|
|
|
} catch (IllegalArgumentException | WrongMethodTypeException ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
}
|
|
|
|
}
|
2013-10-05 12:30:39 +00:00
|
|
|
final int MAX_MH_ARITY = MAX_JVM_ARITY - 1; // mh.invoke(arg*[N])
|
|
|
|
final int MAX_INVOKER_ARITY = MAX_MH_ARITY - 1; // inv.invoke(mh, arg*[N])
|
|
|
|
for (int arity : new int[]{ 0, 1, MAX_MH_ARITY-2, MAX_MH_ARITY-1, MAX_MH_ARITY }) {
|
|
|
|
MethodHandle mh = MH_hashArguments(arity);
|
|
|
|
if (arity < MAX_INVOKER_ARITY) {
|
|
|
|
MethodHandle ximh = MethodHandles.exactInvoker(mh.type());
|
|
|
|
MethodHandle gimh = MethodHandles.invoker(mh.type());
|
|
|
|
MethodHandle simh = MethodHandles.spreadInvoker(mh.type(), 0);
|
|
|
|
if (arity != 0) {
|
|
|
|
simh = MethodHandles.spreadInvoker(mh.type(), 1);
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
simh = MethodHandles.spreadInvoker(mh.type(), 1);
|
|
|
|
assert(false) : arity;
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (arity != 0) {
|
|
|
|
simh = MethodHandles.spreadInvoker(mh.type(), arity-1);
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
simh = MethodHandles.spreadInvoker(mh.type(), arity-1);
|
|
|
|
assert(false) : arity;
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
simh = MethodHandles.spreadInvoker(mh.type(), arity);
|
|
|
|
}
|
|
|
|
}
|
2012-08-17 20:42:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Make sure the basic argument spreading and varargs mechanisms are working.
|
|
|
|
// Exercise arity 3 thoroughly.
|
|
|
|
@Test
|
|
|
|
public void testSpreads() throws Throwable {
|
|
|
|
System.out.println("testing asSpreader on arity=3");
|
|
|
|
Object[] args = testArgs(3);
|
|
|
|
int r0 = Objects.hash(args);
|
|
|
|
MethodHandle mh = MH_hashArguments(3);
|
|
|
|
Object r;
|
|
|
|
r = mh.invokeExact(args[0], args[1], args[2]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invoke(args[0], args[1], args[2]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invoke((Comparable) args[0], (Integer) args[1], (Number) args[2]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invokeWithArguments(args);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
for (Class<?> cls0 : new Class<?>[] {
|
|
|
|
Object[].class, Number[].class, Integer[].class, Comparable[].class
|
|
|
|
}) {
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
Class<? extends Object[]> cls = (Class<? extends Object[]>) cls0;
|
|
|
|
//Class<? extends Object[]> cls = Object[].class.asSubclass(cls0);
|
|
|
|
int nargs = args.length, skip;
|
|
|
|
MethodHandle smh = mh.asSpreader(cls, nargs - (skip = 0));
|
|
|
|
Object[] tail = Arrays.copyOfRange(args, skip, nargs, cls);
|
|
|
|
if (cls == Object[].class)
|
|
|
|
r = smh.invokeExact(tail);
|
|
|
|
else if (cls == Integer[].class)
|
2013-10-05 12:30:39 +00:00
|
|
|
r = smh.invokeExact((Integer[]) tail); //warning OK, see 8019340
|
2012-08-17 20:42:25 +00:00
|
|
|
else
|
|
|
|
r = smh.invoke(tail);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
smh = mh.asSpreader(cls, nargs - (skip = 1));
|
|
|
|
tail = Arrays.copyOfRange(args, skip, nargs, cls);
|
|
|
|
if (cls == Object[].class)
|
|
|
|
r = smh.invokeExact(args[0], tail);
|
|
|
|
else if (cls == Integer[].class)
|
|
|
|
r = smh.invokeExact(args[0], (Integer[]) tail);
|
|
|
|
else
|
|
|
|
r = smh.invoke(args[0], tail);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
smh = mh.asSpreader(cls, nargs - (skip = 2));
|
|
|
|
tail = Arrays.copyOfRange(args, skip, nargs, cls);
|
|
|
|
if (cls == Object[].class)
|
|
|
|
r = smh.invokeExact(args[0], args[1], tail);
|
|
|
|
else if (cls == Integer[].class)
|
|
|
|
r = smh.invokeExact(args[0], args[1], (Integer[]) tail);
|
|
|
|
else
|
|
|
|
r = smh.invoke(args[0], args[1], tail);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
smh = mh.asSpreader(cls, nargs - (skip = 3));
|
|
|
|
tail = Arrays.copyOfRange(args, skip, nargs, cls);
|
|
|
|
if (cls == Object[].class)
|
|
|
|
r = smh.invokeExact(args[0], args[1], args[2], tail);
|
|
|
|
else if (cls == Integer[].class)
|
|
|
|
r = smh.invokeExact(args[0], args[1], args[2], (Integer[]) tail);
|
|
|
|
else
|
|
|
|
r = smh.invoke(args[0], args[1], args[2], tail);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
// Try null array in addition to zero-length array:
|
|
|
|
tail = null;
|
|
|
|
if (cls == Object[].class)
|
|
|
|
r = smh.invokeExact(args[0], args[1], args[2], tail);
|
|
|
|
else if (cls == Integer[].class)
|
|
|
|
r = smh.invokeExact(args[0], args[1], args[2], (Integer[]) tail);
|
|
|
|
else
|
|
|
|
r = smh.invoke(args[0], args[1], args[2], tail);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void testInvokeWithArguments() throws Throwable {
|
|
|
|
System.out.println("testing invokeWithArguments on all arities");
|
|
|
|
for (int arity = 0; arity < MAX_ARITY; arity++) {
|
|
|
|
Object[] args = testArgs(arity);
|
|
|
|
Object r0 = Objects.hash(args);
|
|
|
|
Object r = MH_hashArguments(arity).invokeWithArguments(args);
|
|
|
|
assertEquals("arity="+arity, r0, r);
|
|
|
|
}
|
|
|
|
// The next one is the most likely to fail:
|
|
|
|
int arity = MAX_ARITY;
|
|
|
|
Object[] args = testArgs(arity);
|
|
|
|
Object r0 = Objects.hash(args);
|
|
|
|
Object r = MH_hashArguments(arity).invokeWithArguments(args);
|
|
|
|
assertEquals("arity=MAX_ARITY", r0, r);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Object[] cat(Object a, Object[] b) {
|
|
|
|
int alen = 1, blen = b.length;
|
|
|
|
Object[] c = new Object[alen + blen];
|
|
|
|
c[0] = a;
|
|
|
|
System.arraycopy(b, 0, c, alen, blen);
|
|
|
|
return c;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void testArities() throws Throwable {
|
|
|
|
System.out.println("testing spreaders and collectors on high arities...");
|
|
|
|
int iterations = ITERATION_COUNT;
|
|
|
|
testArities(Object[].class, MIN_ARITY-10, MIN_ARITY-1, iterations / 1000);
|
|
|
|
testArities(Object[].class, MIN_ARITY, SLOW_ARITY-1, iterations);
|
|
|
|
testArities(Object[].class, SLOW_ARITY, MAX_ARITY, iterations / 1000);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void testAritiesOnTypedArrays() throws Throwable {
|
|
|
|
for (Class<?> cls0 : new Class<?>[] {
|
|
|
|
Number[].class, Integer[].class, Comparable[].class
|
|
|
|
}) {
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
Class<? extends Object[]> cls = (Class<? extends Object[]>) cls0;
|
|
|
|
System.out.println("array class: "+cls.getSimpleName());
|
|
|
|
int iterations = ITERATION_COUNT / 1000;
|
|
|
|
testArities(cls, MIN_ARITY, SLOW_ARITY-1, iterations);
|
|
|
|
testArities(cls, SLOW_ARITY, MAX_ARITY, iterations / 100);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void testArities(Class<? extends Object[]> cls,
|
|
|
|
int minArity,
|
|
|
|
int maxArity,
|
|
|
|
int iterations) throws Throwable {
|
|
|
|
boolean verbose = (cls == Object[].class);
|
|
|
|
for (int arity = minArity; arity <= maxArity; arity++) {
|
|
|
|
if (verbose) System.out.println("arity="+arity);
|
|
|
|
MethodHandle mh = MH_hashArguments(cls, arity);
|
|
|
|
MethodHandle mh_VA = mh.asSpreader(cls, arity);
|
|
|
|
assert(mh_VA.type().parameterType(0) == cls);
|
|
|
|
testArities(cls, arity, iterations, verbose, mh, mh_VA);
|
2013-10-05 12:30:39 +00:00
|
|
|
// mh_CA will collect arguments of a particular type and pass them to mh_VA
|
|
|
|
MethodHandle mh_CA = mh_VA.asCollector(cls, arity);
|
|
|
|
MethodHandle mh_VA2 = mh_CA.asSpreader(cls, arity);
|
|
|
|
assert(mh_CA.type().equals(mh.type()));
|
|
|
|
assert(mh_VA2.type().equals(mh_VA.type()));
|
2012-08-17 20:42:25 +00:00
|
|
|
if (cls != Object[].class) {
|
|
|
|
try {
|
|
|
|
mh_VA2.invokeWithArguments(new Object[arity]);
|
|
|
|
throw new AssertionError("should not reach");
|
|
|
|
} catch (ClassCastException | WrongMethodTypeException ex) {
|
|
|
|
}
|
|
|
|
}
|
2013-10-05 12:30:39 +00:00
|
|
|
int iterations_VA = iterations / 100;
|
|
|
|
testArities(cls, arity, iterations_VA, false, mh_CA, mh_VA2);
|
2012-08-17 20:42:25 +00:00
|
|
|
}
|
|
|
|
}
|
2013-10-05 12:30:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tests calls to {@link BigArityTest#hashArguments hashArguments} as related to a single given arity N.
|
|
|
|
* Applies the given {@code mh} to a set of N integer arguments, checking the answer.
|
|
|
|
* Also applies the varargs variation {@code mh_VA} to an array of type C[] (given by {@code cls}).
|
|
|
|
* Test steps:
|
|
|
|
* <ul>
|
|
|
|
* <li>mh_VA.invokeExact(new C[]{ arg, ... })</li>
|
|
|
|
* <li>mh.invokeWithArguments((Object[]) new C[]{ arg, ... })</li>
|
|
|
|
* <li>exactInvoker(mh.type()).invokeWithArguments(new Object[]{ mh, arg, ... })</li>
|
|
|
|
* <li>invoker(mh.type()).invokeWithArguments(new Object[]{ mh, arg, ... })</li>
|
|
|
|
* </ul>
|
|
|
|
* @param cls array type for varargs call (one of Object[], Number[], Integer[], Comparable[])
|
|
|
|
* @param arity N, the number of arguments to {@code mh} and length of its varargs array, in [0..255]
|
|
|
|
* @param iterations number of times to repeat each test step (at least 4)
|
|
|
|
* @param verbose are we printing extra output?
|
|
|
|
* @param mh a fixed-arity version of {@code hashArguments}
|
|
|
|
* @param mh_VA a variable-arity version of {@code hashArguments}, accepting the given array type {@code cls}
|
|
|
|
*/
|
2012-08-17 20:42:25 +00:00
|
|
|
private void testArities(Class<? extends Object[]> cls,
|
|
|
|
int arity,
|
|
|
|
int iterations,
|
|
|
|
boolean verbose,
|
|
|
|
MethodHandle mh,
|
|
|
|
MethodHandle mh_VA
|
|
|
|
) throws Throwable {
|
|
|
|
if (iterations < 4) iterations = 4;
|
|
|
|
final int MAX_MH_ARITY = MAX_JVM_ARITY - 1; // mh.invoke(arg*[N])
|
|
|
|
final int MAX_INVOKER_ARITY = MAX_MH_ARITY - 1; // inv.invoke(mh, arg*[N])
|
|
|
|
Object[] args = testArgs(arity);
|
|
|
|
if (cls != Object[].class)
|
|
|
|
args = Arrays.copyOf(args, arity, cls);
|
|
|
|
Object r0 = Objects.hash(args);
|
|
|
|
Object r;
|
|
|
|
MethodHandle ximh = null;
|
|
|
|
MethodHandle gimh = null;
|
|
|
|
if (arity <= MAX_INVOKER_ARITY) {
|
|
|
|
ximh = MethodHandles.exactInvoker(mh.type());
|
|
|
|
gimh = MethodHandles.invoker(mh.type());
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
ximh = MethodHandles.exactInvoker(mh.type());
|
|
|
|
throw new AssertionError("should fail to create ximh of arity "+arity);
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
if (verbose)
|
|
|
|
System.out.println("OK: xmih["+arity+"] => "+ex);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
gimh = MethodHandles.invoker(mh.type());
|
|
|
|
throw new AssertionError("should fail to create gimh of arity "+arity);
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
if (verbose)
|
|
|
|
System.out.println("OK: gmih["+arity+"] => "+ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Object[] mh_args = cat(mh, args);
|
|
|
|
assert(arity <= MAX_MH_ARITY);
|
|
|
|
for (int i = 0; i < iterations; ++i) {
|
|
|
|
if (cls == Object[].class)
|
|
|
|
r = mh_VA.invokeExact(args);
|
|
|
|
else if (cls == Integer[].class)
|
2013-10-05 12:30:39 +00:00
|
|
|
r = mh_VA.invokeExact((Integer[])args); //warning OK, see 8019340
|
2012-08-17 20:42:25 +00:00
|
|
|
else
|
|
|
|
r = mh_VA.invoke(args);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invokeWithArguments(args);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
if (ximh != null) {
|
|
|
|
r = ximh.invokeWithArguments(mh_args);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
}
|
|
|
|
if (gimh != null) {
|
|
|
|
r = gimh.invokeWithArguments(mh_args);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static Object hashArguments_252(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="Object x00, Object x01, Object x02, Object x03, Object x04, ...">
|
|
|
|
Object x00, Object x01, Object x02, Object x03, Object x04, Object x05, Object x06, Object x07,
|
|
|
|
Object x08, Object x09, Object x0A, Object x0B, Object x0C, Object x0D, Object x0E, Object x0F,
|
|
|
|
Object x10, Object x11, Object x12, Object x13, Object x14, Object x15, Object x16, Object x17,
|
|
|
|
Object x18, Object x19, Object x1A, Object x1B, Object x1C, Object x1D, Object x1E, Object x1F,
|
|
|
|
Object x20, Object x21, Object x22, Object x23, Object x24, Object x25, Object x26, Object x27,
|
|
|
|
Object x28, Object x29, Object x2A, Object x2B, Object x2C, Object x2D, Object x2E, Object x2F,
|
|
|
|
Object x30, Object x31, Object x32, Object x33, Object x34, Object x35, Object x36, Object x37,
|
|
|
|
Object x38, Object x39, Object x3A, Object x3B, Object x3C, Object x3D, Object x3E, Object x3F,
|
|
|
|
Object x40, Object x41, Object x42, Object x43, Object x44, Object x45, Object x46, Object x47,
|
|
|
|
Object x48, Object x49, Object x4A, Object x4B, Object x4C, Object x4D, Object x4E, Object x4F,
|
|
|
|
Object x50, Object x51, Object x52, Object x53, Object x54, Object x55, Object x56, Object x57,
|
|
|
|
Object x58, Object x59, Object x5A, Object x5B, Object x5C, Object x5D, Object x5E, Object x5F,
|
|
|
|
Object x60, Object x61, Object x62, Object x63, Object x64, Object x65, Object x66, Object x67,
|
|
|
|
Object x68, Object x69, Object x6A, Object x6B, Object x6C, Object x6D, Object x6E, Object x6F,
|
|
|
|
Object x70, Object x71, Object x72, Object x73, Object x74, Object x75, Object x76, Object x77,
|
|
|
|
Object x78, Object x79, Object x7A, Object x7B, Object x7C, Object x7D, Object x7E, Object x7F,
|
|
|
|
Object x80, Object x81, Object x82, Object x83, Object x84, Object x85, Object x86, Object x87,
|
|
|
|
Object x88, Object x89, Object x8A, Object x8B, Object x8C, Object x8D, Object x8E, Object x8F,
|
|
|
|
Object x90, Object x91, Object x92, Object x93, Object x94, Object x95, Object x96, Object x97,
|
|
|
|
Object x98, Object x99, Object x9A, Object x9B, Object x9C, Object x9D, Object x9E, Object x9F,
|
|
|
|
Object xA0, Object xA1, Object xA2, Object xA3, Object xA4, Object xA5, Object xA6, Object xA7,
|
|
|
|
Object xA8, Object xA9, Object xAA, Object xAB, Object xAC, Object xAD, Object xAE, Object xAF,
|
|
|
|
Object xB0, Object xB1, Object xB2, Object xB3, Object xB4, Object xB5, Object xB6, Object xB7,
|
|
|
|
Object xB8, Object xB9, Object xBA, Object xBB, Object xBC, Object xBD, Object xBE, Object xBF,
|
|
|
|
Object xC0, Object xC1, Object xC2, Object xC3, Object xC4, Object xC5, Object xC6, Object xC7,
|
|
|
|
Object xC8, Object xC9, Object xCA, Object xCB, Object xCC, Object xCD, Object xCE, Object xCF,
|
|
|
|
Object xD0, Object xD1, Object xD2, Object xD3, Object xD4, Object xD5, Object xD6, Object xD7,
|
|
|
|
Object xD8, Object xD9, Object xDA, Object xDB, Object xDC, Object xDD, Object xDE, Object xDF,
|
|
|
|
Object xE0, Object xE1, Object xE2, Object xE3, Object xE4, Object xE5, Object xE6, Object xE7,
|
|
|
|
Object xE8, Object xE9, Object xEA, Object xEB, Object xEC, Object xED, Object xEE, Object xEF,
|
|
|
|
Object xF0, Object xF1, Object xF2, Object xF3, Object xF4, Object xF5, Object xF6, Object xF7,
|
|
|
|
// </editor-fold>
|
|
|
|
Object xF8, Object xF9, Object xFA, Object xFB) {
|
|
|
|
return Objects.hash(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="x00, x01, x02, x03, x04, ...">
|
|
|
|
x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x0A, x0B, x0C, x0D, x0E, x0F,
|
|
|
|
x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x1A, x1B, x1C, x1D, x1E, x1F,
|
|
|
|
x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x2A, x2B, x2C, x2D, x2E, x2F,
|
|
|
|
x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x3A, x3B, x3C, x3D, x3E, x3F,
|
|
|
|
x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x4A, x4B, x4C, x4D, x4E, x4F,
|
|
|
|
x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x5A, x5B, x5C, x5D, x5E, x5F,
|
|
|
|
x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x6A, x6B, x6C, x6D, x6E, x6F,
|
|
|
|
x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x7A, x7B, x7C, x7D, x7E, x7F,
|
|
|
|
x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x8A, x8B, x8C, x8D, x8E, x8F,
|
|
|
|
x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x9A, x9B, x9C, x9D, x9E, x9F,
|
|
|
|
xA0, xA1, xA2, xA3, xA4, xA5, xA6, xA7, xA8, xA9, xAA, xAB, xAC, xAD, xAE, xAF,
|
|
|
|
xB0, xB1, xB2, xB3, xB4, xB5, xB6, xB7, xB8, xB9, xBA, xBB, xBC, xBD, xBE, xBF,
|
|
|
|
xC0, xC1, xC2, xC3, xC4, xC5, xC6, xC7, xC8, xC9, xCA, xCB, xCC, xCD, xCE, xCF,
|
|
|
|
xD0, xD1, xD2, xD3, xD4, xD5, xD6, xD7, xD8, xD9, xDA, xDB, xDC, xDD, xDE, xDF,
|
|
|
|
xE0, xE1, xE2, xE3, xE4, xE5, xE6, xE7, xE8, xE9, xEA, xEB, xEC, xED, xEE, xEF,
|
|
|
|
xF0, xF1, xF2, xF3, xF4, xF5, xF6, xF7,
|
|
|
|
// </editor-fold>
|
|
|
|
xF8, xF9, xFA, xFB);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void test252() throws Throwable {
|
|
|
|
final int ARITY = 252;
|
|
|
|
System.out.println("test"+ARITY);
|
|
|
|
Object[] a = testArgs(ARITY);
|
|
|
|
Object r0 = hashArguments(a);
|
|
|
|
Object r;
|
|
|
|
r = hashArguments_252(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
2013-10-05 12:30:39 +00:00
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB]); // hashArguments_252
|
2012-08-17 20:42:25 +00:00
|
|
|
assertEquals(r0, r);
|
|
|
|
MethodType mt = MethodType.genericMethodType(ARITY);
|
|
|
|
MethodHandle mh = MethodHandles.lookup().findStatic(BigArityTest.class, "hashArguments_"+ARITY, mt);
|
2013-10-05 12:30:39 +00:00
|
|
|
test252(mh, a, r0);
|
|
|
|
MethodHandle mh_CA = MH_hashArguments_VA.asFixedArity().asCollector(Object[].class, ARITY);
|
|
|
|
test252(mh_CA, a, r0);
|
|
|
|
}
|
|
|
|
public void test252(MethodHandle mh, Object[] a, Object r0) throws Throwable {
|
|
|
|
Object r;
|
2012-08-17 20:42:25 +00:00
|
|
|
r = mh.invokeExact(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invokeWithArguments(a);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
MethodHandle ximh = MethodHandles.exactInvoker(mh.type());
|
|
|
|
r = ximh.invokeExact(mh,
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = ximh.invokeWithArguments(cat(mh,a));
|
|
|
|
assertEquals(r0, r);
|
|
|
|
MethodHandle gimh = MethodHandles.invoker(mh.type());
|
|
|
|
r = gimh.invoke(mh,
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="(Number) a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
(Number)
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = gimh.invokeWithArguments(cat(mh,a));
|
|
|
|
assertEquals(r0, r);
|
|
|
|
mh = mh.asType(mh.type().changeParameterType(0x10, Integer.class));
|
|
|
|
//System.out.println("type="+mh.type().toString().replaceAll("Object", ""));
|
|
|
|
r = mh.invokeExact(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ... (Integer) a[0x10], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
(Integer)
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invoke(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="(Comparable) a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
(Comparable<?>)
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Object hashArguments_253(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="Object x00, Object x01, Object x02, Object x03, Object x04, ...">
|
|
|
|
Object x00, Object x01, Object x02, Object x03, Object x04, Object x05, Object x06, Object x07,
|
|
|
|
Object x08, Object x09, Object x0A, Object x0B, Object x0C, Object x0D, Object x0E, Object x0F,
|
|
|
|
Object x10, Object x11, Object x12, Object x13, Object x14, Object x15, Object x16, Object x17,
|
|
|
|
Object x18, Object x19, Object x1A, Object x1B, Object x1C, Object x1D, Object x1E, Object x1F,
|
|
|
|
Object x20, Object x21, Object x22, Object x23, Object x24, Object x25, Object x26, Object x27,
|
|
|
|
Object x28, Object x29, Object x2A, Object x2B, Object x2C, Object x2D, Object x2E, Object x2F,
|
|
|
|
Object x30, Object x31, Object x32, Object x33, Object x34, Object x35, Object x36, Object x37,
|
|
|
|
Object x38, Object x39, Object x3A, Object x3B, Object x3C, Object x3D, Object x3E, Object x3F,
|
|
|
|
Object x40, Object x41, Object x42, Object x43, Object x44, Object x45, Object x46, Object x47,
|
|
|
|
Object x48, Object x49, Object x4A, Object x4B, Object x4C, Object x4D, Object x4E, Object x4F,
|
|
|
|
Object x50, Object x51, Object x52, Object x53, Object x54, Object x55, Object x56, Object x57,
|
|
|
|
Object x58, Object x59, Object x5A, Object x5B, Object x5C, Object x5D, Object x5E, Object x5F,
|
|
|
|
Object x60, Object x61, Object x62, Object x63, Object x64, Object x65, Object x66, Object x67,
|
|
|
|
Object x68, Object x69, Object x6A, Object x6B, Object x6C, Object x6D, Object x6E, Object x6F,
|
|
|
|
Object x70, Object x71, Object x72, Object x73, Object x74, Object x75, Object x76, Object x77,
|
|
|
|
Object x78, Object x79, Object x7A, Object x7B, Object x7C, Object x7D, Object x7E, Object x7F,
|
|
|
|
Object x80, Object x81, Object x82, Object x83, Object x84, Object x85, Object x86, Object x87,
|
|
|
|
Object x88, Object x89, Object x8A, Object x8B, Object x8C, Object x8D, Object x8E, Object x8F,
|
|
|
|
Object x90, Object x91, Object x92, Object x93, Object x94, Object x95, Object x96, Object x97,
|
|
|
|
Object x98, Object x99, Object x9A, Object x9B, Object x9C, Object x9D, Object x9E, Object x9F,
|
|
|
|
Object xA0, Object xA1, Object xA2, Object xA3, Object xA4, Object xA5, Object xA6, Object xA7,
|
|
|
|
Object xA8, Object xA9, Object xAA, Object xAB, Object xAC, Object xAD, Object xAE, Object xAF,
|
|
|
|
Object xB0, Object xB1, Object xB2, Object xB3, Object xB4, Object xB5, Object xB6, Object xB7,
|
|
|
|
Object xB8, Object xB9, Object xBA, Object xBB, Object xBC, Object xBD, Object xBE, Object xBF,
|
|
|
|
Object xC0, Object xC1, Object xC2, Object xC3, Object xC4, Object xC5, Object xC6, Object xC7,
|
|
|
|
Object xC8, Object xC9, Object xCA, Object xCB, Object xCC, Object xCD, Object xCE, Object xCF,
|
|
|
|
Object xD0, Object xD1, Object xD2, Object xD3, Object xD4, Object xD5, Object xD6, Object xD7,
|
|
|
|
Object xD8, Object xD9, Object xDA, Object xDB, Object xDC, Object xDD, Object xDE, Object xDF,
|
|
|
|
Object xE0, Object xE1, Object xE2, Object xE3, Object xE4, Object xE5, Object xE6, Object xE7,
|
|
|
|
Object xE8, Object xE9, Object xEA, Object xEB, Object xEC, Object xED, Object xEE, Object xEF,
|
|
|
|
Object xF0, Object xF1, Object xF2, Object xF3, Object xF4, Object xF5, Object xF6, Object xF7,
|
|
|
|
// </editor-fold>
|
|
|
|
Object xF8, Object xF9, Object xFA, Object xFB, Object xFC) {
|
|
|
|
return Objects.hash(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="x00, x01, x02, x03, x04, ...">
|
|
|
|
x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x0A, x0B, x0C, x0D, x0E, x0F,
|
|
|
|
x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x1A, x1B, x1C, x1D, x1E, x1F,
|
|
|
|
x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x2A, x2B, x2C, x2D, x2E, x2F,
|
|
|
|
x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x3A, x3B, x3C, x3D, x3E, x3F,
|
|
|
|
x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x4A, x4B, x4C, x4D, x4E, x4F,
|
|
|
|
x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x5A, x5B, x5C, x5D, x5E, x5F,
|
|
|
|
x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x6A, x6B, x6C, x6D, x6E, x6F,
|
|
|
|
x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x7A, x7B, x7C, x7D, x7E, x7F,
|
|
|
|
x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x8A, x8B, x8C, x8D, x8E, x8F,
|
|
|
|
x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x9A, x9B, x9C, x9D, x9E, x9F,
|
|
|
|
xA0, xA1, xA2, xA3, xA4, xA5, xA6, xA7, xA8, xA9, xAA, xAB, xAC, xAD, xAE, xAF,
|
|
|
|
xB0, xB1, xB2, xB3, xB4, xB5, xB6, xB7, xB8, xB9, xBA, xBB, xBC, xBD, xBE, xBF,
|
|
|
|
xC0, xC1, xC2, xC3, xC4, xC5, xC6, xC7, xC8, xC9, xCA, xCB, xCC, xCD, xCE, xCF,
|
|
|
|
xD0, xD1, xD2, xD3, xD4, xD5, xD6, xD7, xD8, xD9, xDA, xDB, xDC, xDD, xDE, xDF,
|
|
|
|
xE0, xE1, xE2, xE3, xE4, xE5, xE6, xE7, xE8, xE9, xEA, xEB, xEC, xED, xEE, xEF,
|
|
|
|
xF0, xF1, xF2, xF3, xF4, xF5, xF6, xF7,
|
|
|
|
// </editor-fold>
|
|
|
|
xF8, xF9, xFA, xFB, xFC);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void test253() throws Throwable {
|
|
|
|
final int ARITY = 253;
|
|
|
|
System.out.println("test"+ARITY);
|
|
|
|
Object[] a = testArgs(ARITY);
|
|
|
|
Object r0 = hashArguments(a);
|
|
|
|
Object r;
|
|
|
|
r = hashArguments_253(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
2013-10-05 12:30:39 +00:00
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]); // hashArguments_253
|
2012-08-17 20:42:25 +00:00
|
|
|
assertEquals(r0, r);
|
|
|
|
MethodType mt = MethodType.genericMethodType(ARITY);
|
|
|
|
MethodHandle mh = MethodHandles.lookup().findStatic(BigArityTest.class, "hashArguments_"+ARITY, mt);
|
2013-10-05 12:30:39 +00:00
|
|
|
test253(mh, a, r0);
|
|
|
|
MethodHandle mh_CA = MH_hashArguments_VA.asFixedArity().asCollector(Object[].class, ARITY);
|
|
|
|
test253(mh_CA, a, r0);
|
|
|
|
}
|
|
|
|
public void test253(MethodHandle mh, Object[] a, Object r0) throws Throwable {
|
|
|
|
Object r;
|
2012-08-17 20:42:25 +00:00
|
|
|
r = mh.invokeExact(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invokeWithArguments(a);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
MethodHandle ximh = MethodHandles.exactInvoker(mh.type());
|
|
|
|
r = ximh.invokeExact(mh,
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = ximh.invokeWithArguments(cat(mh,a));
|
|
|
|
assertEquals(r0, r);
|
|
|
|
MethodHandle gimh = MethodHandles.invoker(mh.type());
|
|
|
|
r = gimh.invoke(mh,
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="(Number) a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
(Number)
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = gimh.invokeWithArguments(cat(mh,a));
|
|
|
|
assertEquals(r0, r);
|
|
|
|
mh = mh.asType(mh.type().changeParameterType(0x10, Integer.class));
|
|
|
|
//System.out.println("type="+mh.type().toString().replaceAll("Object", ""));
|
|
|
|
r = mh.invokeExact(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ... (Integer) a[0x10], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
(Integer)
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invoke(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="(Comparable) a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
(Comparable<?>)
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Object hashArguments_254(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="Object x00, Object x01, Object x02, Object x03, Object x04, ...">
|
|
|
|
Object x00, Object x01, Object x02, Object x03, Object x04, Object x05, Object x06, Object x07,
|
|
|
|
Object x08, Object x09, Object x0A, Object x0B, Object x0C, Object x0D, Object x0E, Object x0F,
|
|
|
|
Object x10, Object x11, Object x12, Object x13, Object x14, Object x15, Object x16, Object x17,
|
|
|
|
Object x18, Object x19, Object x1A, Object x1B, Object x1C, Object x1D, Object x1E, Object x1F,
|
|
|
|
Object x20, Object x21, Object x22, Object x23, Object x24, Object x25, Object x26, Object x27,
|
|
|
|
Object x28, Object x29, Object x2A, Object x2B, Object x2C, Object x2D, Object x2E, Object x2F,
|
|
|
|
Object x30, Object x31, Object x32, Object x33, Object x34, Object x35, Object x36, Object x37,
|
|
|
|
Object x38, Object x39, Object x3A, Object x3B, Object x3C, Object x3D, Object x3E, Object x3F,
|
|
|
|
Object x40, Object x41, Object x42, Object x43, Object x44, Object x45, Object x46, Object x47,
|
|
|
|
Object x48, Object x49, Object x4A, Object x4B, Object x4C, Object x4D, Object x4E, Object x4F,
|
|
|
|
Object x50, Object x51, Object x52, Object x53, Object x54, Object x55, Object x56, Object x57,
|
|
|
|
Object x58, Object x59, Object x5A, Object x5B, Object x5C, Object x5D, Object x5E, Object x5F,
|
|
|
|
Object x60, Object x61, Object x62, Object x63, Object x64, Object x65, Object x66, Object x67,
|
|
|
|
Object x68, Object x69, Object x6A, Object x6B, Object x6C, Object x6D, Object x6E, Object x6F,
|
|
|
|
Object x70, Object x71, Object x72, Object x73, Object x74, Object x75, Object x76, Object x77,
|
|
|
|
Object x78, Object x79, Object x7A, Object x7B, Object x7C, Object x7D, Object x7E, Object x7F,
|
|
|
|
Object x80, Object x81, Object x82, Object x83, Object x84, Object x85, Object x86, Object x87,
|
|
|
|
Object x88, Object x89, Object x8A, Object x8B, Object x8C, Object x8D, Object x8E, Object x8F,
|
|
|
|
Object x90, Object x91, Object x92, Object x93, Object x94, Object x95, Object x96, Object x97,
|
|
|
|
Object x98, Object x99, Object x9A, Object x9B, Object x9C, Object x9D, Object x9E, Object x9F,
|
|
|
|
Object xA0, Object xA1, Object xA2, Object xA3, Object xA4, Object xA5, Object xA6, Object xA7,
|
|
|
|
Object xA8, Object xA9, Object xAA, Object xAB, Object xAC, Object xAD, Object xAE, Object xAF,
|
|
|
|
Object xB0, Object xB1, Object xB2, Object xB3, Object xB4, Object xB5, Object xB6, Object xB7,
|
|
|
|
Object xB8, Object xB9, Object xBA, Object xBB, Object xBC, Object xBD, Object xBE, Object xBF,
|
|
|
|
Object xC0, Object xC1, Object xC2, Object xC3, Object xC4, Object xC5, Object xC6, Object xC7,
|
|
|
|
Object xC8, Object xC9, Object xCA, Object xCB, Object xCC, Object xCD, Object xCE, Object xCF,
|
|
|
|
Object xD0, Object xD1, Object xD2, Object xD3, Object xD4, Object xD5, Object xD6, Object xD7,
|
|
|
|
Object xD8, Object xD9, Object xDA, Object xDB, Object xDC, Object xDD, Object xDE, Object xDF,
|
|
|
|
Object xE0, Object xE1, Object xE2, Object xE3, Object xE4, Object xE5, Object xE6, Object xE7,
|
|
|
|
Object xE8, Object xE9, Object xEA, Object xEB, Object xEC, Object xED, Object xEE, Object xEF,
|
|
|
|
Object xF0, Object xF1, Object xF2, Object xF3, Object xF4, Object xF5, Object xF6, Object xF7,
|
|
|
|
// </editor-fold>
|
|
|
|
Object xF8, Object xF9, Object xFA, Object xFB, Object xFC, Object xFD) {
|
|
|
|
return Objects.hash(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="x00, x01, x02, x03, x04, ...">
|
|
|
|
x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x0A, x0B, x0C, x0D, x0E, x0F,
|
|
|
|
x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x1A, x1B, x1C, x1D, x1E, x1F,
|
|
|
|
x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x2A, x2B, x2C, x2D, x2E, x2F,
|
|
|
|
x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x3A, x3B, x3C, x3D, x3E, x3F,
|
|
|
|
x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x4A, x4B, x4C, x4D, x4E, x4F,
|
|
|
|
x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x5A, x5B, x5C, x5D, x5E, x5F,
|
|
|
|
x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x6A, x6B, x6C, x6D, x6E, x6F,
|
|
|
|
x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x7A, x7B, x7C, x7D, x7E, x7F,
|
|
|
|
x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x8A, x8B, x8C, x8D, x8E, x8F,
|
|
|
|
x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x9A, x9B, x9C, x9D, x9E, x9F,
|
|
|
|
xA0, xA1, xA2, xA3, xA4, xA5, xA6, xA7, xA8, xA9, xAA, xAB, xAC, xAD, xAE, xAF,
|
|
|
|
xB0, xB1, xB2, xB3, xB4, xB5, xB6, xB7, xB8, xB9, xBA, xBB, xBC, xBD, xBE, xBF,
|
|
|
|
xC0, xC1, xC2, xC3, xC4, xC5, xC6, xC7, xC8, xC9, xCA, xCB, xCC, xCD, xCE, xCF,
|
|
|
|
xD0, xD1, xD2, xD3, xD4, xD5, xD6, xD7, xD8, xD9, xDA, xDB, xDC, xDD, xDE, xDF,
|
|
|
|
xE0, xE1, xE2, xE3, xE4, xE5, xE6, xE7, xE8, xE9, xEA, xEB, xEC, xED, xEE, xEF,
|
|
|
|
xF0, xF1, xF2, xF3, xF4, xF5, xF6, xF7,
|
|
|
|
// </editor-fold>
|
|
|
|
xF8, xF9, xFA, xFB, xFC, xFD);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void test254() throws Throwable {
|
|
|
|
final int ARITY = 254;
|
|
|
|
System.out.println("test"+ARITY);
|
|
|
|
Object[] a = testArgs(ARITY);
|
|
|
|
Object r0 = hashArguments(a);
|
|
|
|
Object r;
|
|
|
|
r = hashArguments_254(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
2013-10-05 12:30:39 +00:00
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD]); // hashArguments_254
|
2012-08-17 20:42:25 +00:00
|
|
|
assertEquals(r0, r);
|
|
|
|
MethodType mt = MethodType.genericMethodType(ARITY);
|
|
|
|
MethodHandle mh = MethodHandles.lookup().findStatic(BigArityTest.class, "hashArguments_"+ARITY, mt);
|
2013-10-05 12:30:39 +00:00
|
|
|
test254(mh, a, r0);
|
|
|
|
MethodHandle mh_CA = MH_hashArguments_VA.asFixedArity().asCollector(Object[].class, ARITY);
|
|
|
|
test254(mh_CA, a, r0);
|
|
|
|
}
|
|
|
|
public void test254(MethodHandle mh, Object[] a, Object r0) throws Throwable {
|
|
|
|
Object r;
|
2012-08-17 20:42:25 +00:00
|
|
|
r = mh.invokeExact(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invokeWithArguments(a);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
try {
|
|
|
|
MethodHandle ximh = MethodHandles.exactInvoker(mh.type());
|
|
|
|
throw new AssertionError("should have thrown IAE; cannot have 1+1+254 arguments");
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
}
|
|
|
|
mh = mh.asType(mh.type().changeParameterType(0x10, Integer.class));
|
|
|
|
//System.out.println("type="+mh.type().toString().replaceAll("Object", ""));
|
|
|
|
r = mh.invokeExact(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ... (Integer) a[0x10], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
(Integer)
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
mh = mh.asType(mh.type().changeParameterType(0xE0, Number.class));
|
|
|
|
//System.out.println("type="+mh.type().toString().replaceAll("Object", ""));
|
|
|
|
r = mh.invokeExact(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ... (Integer) a[0x10], ... (Number) a[0xE0], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
(Integer)
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
(Number)
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
r = mh.invoke(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="(Comparable) a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
(Comparable<?>)
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD]);
|
|
|
|
assertEquals(r0, r);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Object hashArguments_255(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="Object x00, Object x01, Object x02, Object x03, Object x04, ...">
|
|
|
|
Object x00, Object x01, Object x02, Object x03, Object x04, Object x05, Object x06, Object x07,
|
|
|
|
Object x08, Object x09, Object x0A, Object x0B, Object x0C, Object x0D, Object x0E, Object x0F,
|
|
|
|
Object x10, Object x11, Object x12, Object x13, Object x14, Object x15, Object x16, Object x17,
|
|
|
|
Object x18, Object x19, Object x1A, Object x1B, Object x1C, Object x1D, Object x1E, Object x1F,
|
|
|
|
Object x20, Object x21, Object x22, Object x23, Object x24, Object x25, Object x26, Object x27,
|
|
|
|
Object x28, Object x29, Object x2A, Object x2B, Object x2C, Object x2D, Object x2E, Object x2F,
|
|
|
|
Object x30, Object x31, Object x32, Object x33, Object x34, Object x35, Object x36, Object x37,
|
|
|
|
Object x38, Object x39, Object x3A, Object x3B, Object x3C, Object x3D, Object x3E, Object x3F,
|
|
|
|
Object x40, Object x41, Object x42, Object x43, Object x44, Object x45, Object x46, Object x47,
|
|
|
|
Object x48, Object x49, Object x4A, Object x4B, Object x4C, Object x4D, Object x4E, Object x4F,
|
|
|
|
Object x50, Object x51, Object x52, Object x53, Object x54, Object x55, Object x56, Object x57,
|
|
|
|
Object x58, Object x59, Object x5A, Object x5B, Object x5C, Object x5D, Object x5E, Object x5F,
|
|
|
|
Object x60, Object x61, Object x62, Object x63, Object x64, Object x65, Object x66, Object x67,
|
|
|
|
Object x68, Object x69, Object x6A, Object x6B, Object x6C, Object x6D, Object x6E, Object x6F,
|
|
|
|
Object x70, Object x71, Object x72, Object x73, Object x74, Object x75, Object x76, Object x77,
|
|
|
|
Object x78, Object x79, Object x7A, Object x7B, Object x7C, Object x7D, Object x7E, Object x7F,
|
|
|
|
Object x80, Object x81, Object x82, Object x83, Object x84, Object x85, Object x86, Object x87,
|
|
|
|
Object x88, Object x89, Object x8A, Object x8B, Object x8C, Object x8D, Object x8E, Object x8F,
|
|
|
|
Object x90, Object x91, Object x92, Object x93, Object x94, Object x95, Object x96, Object x97,
|
|
|
|
Object x98, Object x99, Object x9A, Object x9B, Object x9C, Object x9D, Object x9E, Object x9F,
|
|
|
|
Object xA0, Object xA1, Object xA2, Object xA3, Object xA4, Object xA5, Object xA6, Object xA7,
|
|
|
|
Object xA8, Object xA9, Object xAA, Object xAB, Object xAC, Object xAD, Object xAE, Object xAF,
|
|
|
|
Object xB0, Object xB1, Object xB2, Object xB3, Object xB4, Object xB5, Object xB6, Object xB7,
|
|
|
|
Object xB8, Object xB9, Object xBA, Object xBB, Object xBC, Object xBD, Object xBE, Object xBF,
|
|
|
|
Object xC0, Object xC1, Object xC2, Object xC3, Object xC4, Object xC5, Object xC6, Object xC7,
|
|
|
|
Object xC8, Object xC9, Object xCA, Object xCB, Object xCC, Object xCD, Object xCE, Object xCF,
|
|
|
|
Object xD0, Object xD1, Object xD2, Object xD3, Object xD4, Object xD5, Object xD6, Object xD7,
|
|
|
|
Object xD8, Object xD9, Object xDA, Object xDB, Object xDC, Object xDD, Object xDE, Object xDF,
|
|
|
|
Object xE0, Object xE1, Object xE2, Object xE3, Object xE4, Object xE5, Object xE6, Object xE7,
|
|
|
|
Object xE8, Object xE9, Object xEA, Object xEB, Object xEC, Object xED, Object xEE, Object xEF,
|
|
|
|
Object xF0, Object xF1, Object xF2, Object xF3, Object xF4, Object xF5, Object xF6, Object xF7,
|
|
|
|
// </editor-fold>
|
|
|
|
Object xF8, Object xF9, Object xFA, Object xFB, Object xFC, Object xFD, Object xFE) {
|
|
|
|
return Objects.hash(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="x00, x01, x02, x03, x04, ...">
|
|
|
|
x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x0A, x0B, x0C, x0D, x0E, x0F,
|
|
|
|
x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x1A, x1B, x1C, x1D, x1E, x1F,
|
|
|
|
x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x2A, x2B, x2C, x2D, x2E, x2F,
|
|
|
|
x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x3A, x3B, x3C, x3D, x3E, x3F,
|
|
|
|
x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x4A, x4B, x4C, x4D, x4E, x4F,
|
|
|
|
x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x5A, x5B, x5C, x5D, x5E, x5F,
|
|
|
|
x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x6A, x6B, x6C, x6D, x6E, x6F,
|
|
|
|
x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x7A, x7B, x7C, x7D, x7E, x7F,
|
|
|
|
x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x8A, x8B, x8C, x8D, x8E, x8F,
|
|
|
|
x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x9A, x9B, x9C, x9D, x9E, x9F,
|
|
|
|
xA0, xA1, xA2, xA3, xA4, xA5, xA6, xA7, xA8, xA9, xAA, xAB, xAC, xAD, xAE, xAF,
|
|
|
|
xB0, xB1, xB2, xB3, xB4, xB5, xB6, xB7, xB8, xB9, xBA, xBB, xBC, xBD, xBE, xBF,
|
|
|
|
xC0, xC1, xC2, xC3, xC4, xC5, xC6, xC7, xC8, xC9, xCA, xCB, xCC, xCD, xCE, xCF,
|
|
|
|
xD0, xD1, xD2, xD3, xD4, xD5, xD6, xD7, xD8, xD9, xDA, xDB, xDC, xDD, xDE, xDF,
|
|
|
|
xE0, xE1, xE2, xE3, xE4, xE5, xE6, xE7, xE8, xE9, xEA, xEB, xEC, xED, xEE, xEF,
|
|
|
|
xF0, xF1, xF2, xF3, xF4, xF5, xF6, xF7,
|
|
|
|
// </editor-fold>
|
|
|
|
xF8, xF9, xFA, xFB, xFC, xFD, xFE);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void test255() throws Throwable {
|
|
|
|
final int ARITY = 255;
|
|
|
|
System.out.println("test"+ARITY);
|
|
|
|
Object[] a = testArgs(ARITY);
|
|
|
|
Object r0 = hashArguments(a);
|
|
|
|
Object r;
|
|
|
|
r = hashArguments_255(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
2013-10-05 12:30:39 +00:00
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD], a[0xFE]); // hashArguments_255
|
2012-08-17 20:42:25 +00:00
|
|
|
assertEquals(r0, r);
|
|
|
|
MethodType mt = MethodType.genericMethodType(ARITY);
|
|
|
|
MethodHandle mh;
|
|
|
|
try {
|
|
|
|
mh = MethodHandles.lookup().findStatic(BigArityTest.class, "hashArguments_"+ARITY, mt);
|
|
|
|
throw new AssertionError("should not create an arity 255 method handle");
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
mh = MethodHandles.lookup().findStatic(BigArityTest.class, "hashArguments_"+(ARITY-1), mt.dropParameterTypes(ARITY-1, ARITY));
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
r = mh.invokeExact(
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
|
|
|
|
a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
|
|
|
|
a[0x10], a[0x11], a[0x12], a[0x13], a[0x14], a[0x15], a[0x16], a[0x17], a[0x18], a[0x19], a[0x1A], a[0x1B], a[0x1C], a[0x1D], a[0x1E], a[0x1F],
|
|
|
|
a[0x20], a[0x21], a[0x22], a[0x23], a[0x24], a[0x25], a[0x26], a[0x27], a[0x28], a[0x29], a[0x2A], a[0x2B], a[0x2C], a[0x2D], a[0x2E], a[0x2F],
|
|
|
|
a[0x30], a[0x31], a[0x32], a[0x33], a[0x34], a[0x35], a[0x36], a[0x37], a[0x38], a[0x39], a[0x3A], a[0x3B], a[0x3C], a[0x3D], a[0x3E], a[0x3F],
|
|
|
|
a[0x40], a[0x41], a[0x42], a[0x43], a[0x44], a[0x45], a[0x46], a[0x47], a[0x48], a[0x49], a[0x4A], a[0x4B], a[0x4C], a[0x4D], a[0x4E], a[0x4F],
|
|
|
|
a[0x50], a[0x51], a[0x52], a[0x53], a[0x54], a[0x55], a[0x56], a[0x57], a[0x58], a[0x59], a[0x5A], a[0x5B], a[0x5C], a[0x5D], a[0x5E], a[0x5F],
|
|
|
|
a[0x60], a[0x61], a[0x62], a[0x63], a[0x64], a[0x65], a[0x66], a[0x67], a[0x68], a[0x69], a[0x6A], a[0x6B], a[0x6C], a[0x6D], a[0x6E], a[0x6F],
|
|
|
|
a[0x70], a[0x71], a[0x72], a[0x73], a[0x74], a[0x75], a[0x76], a[0x77], a[0x78], a[0x79], a[0x7A], a[0x7B], a[0x7C], a[0x7D], a[0x7E], a[0x7F],
|
|
|
|
a[0x80], a[0x81], a[0x82], a[0x83], a[0x84], a[0x85], a[0x86], a[0x87], a[0x88], a[0x89], a[0x8A], a[0x8B], a[0x8C], a[0x8D], a[0x8E], a[0x8F],
|
|
|
|
a[0x90], a[0x91], a[0x92], a[0x93], a[0x94], a[0x95], a[0x96], a[0x97], a[0x98], a[0x99], a[0x9A], a[0x9B], a[0x9C], a[0x9D], a[0x9E], a[0x9F],
|
|
|
|
a[0xA0], a[0xA1], a[0xA2], a[0xA3], a[0xA4], a[0xA5], a[0xA6], a[0xA7], a[0xA8], a[0xA9], a[0xAA], a[0xAB], a[0xAC], a[0xAD], a[0xAE], a[0xAF],
|
|
|
|
a[0xB0], a[0xB1], a[0xB2], a[0xB3], a[0xB4], a[0xB5], a[0xB6], a[0xB7], a[0xB8], a[0xB9], a[0xBA], a[0xBB], a[0xBC], a[0xBD], a[0xBE], a[0xBF],
|
|
|
|
a[0xC0], a[0xC1], a[0xC2], a[0xC3], a[0xC4], a[0xC5], a[0xC6], a[0xC7], a[0xC8], a[0xC9], a[0xCA], a[0xCB], a[0xCC], a[0xCD], a[0xCE], a[0xCF],
|
|
|
|
a[0xD0], a[0xD1], a[0xD2], a[0xD3], a[0xD4], a[0xD5], a[0xD6], a[0xD7], a[0xD8], a[0xD9], a[0xDA], a[0xDB], a[0xDC], a[0xDD], a[0xDE], a[0xDF],
|
|
|
|
a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
|
|
|
|
a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
|
|
|
|
// </editor-fold>
|
|
|
|
a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD], a[0xFE]);
|
|
|
|
throw new AssertionError("should not call an arity 255 method handle");
|
|
|
|
} catch (LinkageError ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
MethodHandle ximh = MethodHandles.exactInvoker(mt);
|
|
|
|
throw new AssertionError("should have thrown IAE; cannot have 1+1+255 arguments");
|
|
|
|
} catch (IllegalArgumentException ex) {
|
|
|
|
System.out.println("OK: "+ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|