/libcore/ojluni/src/test/java/lang/invoke/ |
D | MethodHandlesAsCollectorTest.java | 61 for (int nargs = 0; nargs < 50; nargs++) { in testAsCollector0() 62 if (CAN_TEST_LIGHTLY && nargs > 11) break; in testAsCollector0() 63 for (int pos = 0; pos <= nargs; pos++) { in testAsCollector0() 64 if (CAN_TEST_LIGHTLY && pos > 2 && pos < nargs-2) continue; in testAsCollector0() 65 if (nargs > 10 && pos > 4 && pos < nargs-4 && pos % 10 != 3) in testAsCollector0() 67 testAsCollector(argType, pos, nargs); in testAsCollector0() 75 public void testAsCollector(Class<?> argType, int pos, int nargs) throws Throwable { in testAsCollector() argument 78 MethodHandle fake = varargsArray(nargs); in testAsCollector() 90 System.out.println("collect from "+Arrays.asList(args)+" ["+pos+".."+nargs+"]"); in testAsCollector() 91 MethodHandle result = target.asCollector(Object[].class, nargs-pos).asType(newType); in testAsCollector() [all …]
|
D | VarargsArrayTest.java | 83 for (int nargs = MIN; nargs <= MAX; nargs = nextArgCount(nargs, 17, MAX)) { in testVarargsArray() 86 MethodHandle target = varargsArray(Object[].class, nargs); in testVarargsArray() 87 Object[] args = new Object[nargs]; in testVarargsArray() 88 for (int i = 0; i < nargs; i++) in testVarargsArray() 116 private static int nextArgCount(int nargs, int density, int MAX) { in nextArgCount() argument 117 if (EXHAUSTIVE) return nargs + 1; in nextArgCount() 118 if (nargs >= MAX) return Integer.MAX_VALUE; in nextArgCount() 121 if (nargs <= BOT || nargs >= TOP) { in nextArgCount() 122 ++nargs; in nextArgCount() 125 nargs += bump; in nextArgCount() [all …]
|
D | MethodHandlesGeneralTest.java | 1108 for (int nargs = 0; nargs <= 3; nargs++) { in testFilterReturnValue() 1116 testFilterReturnValue(nargs, rtype); in testFilterReturnValue() 1121 void testFilterReturnValue(int nargs, Class<?> rtype) throws Throwable { in testFilterReturnValue() argument 1123 MethodHandle target = varargsList(nargs, rtype); in testFilterReturnValue() 1130 Object[] argsToPass = randomArgs(nargs, Object.class); in testFilterReturnValue() 1147 System.out.println("*** fail at n/rt = "+nargs+"/"+rtype.getSimpleName()+": "+ in testFilterReturnValue() 1157 for (int nargs = 1; nargs <= 6; nargs++) { in testFilterArguments() 1158 for (int pos = 0; pos < nargs; pos++) { in testFilterArguments() 1159 testFilterArguments(nargs, pos); in testFilterArguments() 1164 void testFilterArguments(int nargs, int pos) throws Throwable { in testFilterArguments() argument [all …]
|
D | RicochetTest.java | 145 for (int nargs = 0; nargs <= MAX; nargs++) { in testIntSpreads() 146 if (nargs > 30 && nargs < MAX-20) nargs += 10; in testIntSpreads() 147 int[] args = new int[nargs]; in testIntSpreads() 152 MethodHandle coll = id.asCollector(int[].class, nargs); in testIntSpreads() 154 switch (nargs) { in testIntSpreads() 163 MethodHandle mh = coll.asSpreader(int[].class, nargs); in testIntSpreads() 174 for (int nargs = 0; nargs <= MAX; nargs++) { in testByteSpreads() 175 if (nargs > 30 && nargs < MAX-20) nargs += 10; in testByteSpreads() 176 byte[] args = new byte[nargs]; in testByteSpreads() 181 MethodHandle coll = id.asCollector(byte[].class, nargs); in testByteSpreads() [all …]
|
D | MethodHandlesTest.java | 282 static Object[] randomArgs(int nargs, Class<?> param) { in randomArgs() argument 283 Object[] args = new Object[nargs]; in randomArgs() 393 static MethodHandle addTrailingArgs(MethodHandle target, int nargs, Class<?> argClass) { in addTrailingArgs() argument 395 int extra = (nargs - targetLen); in addTrailingArgs() 814 int nargs = arrays.size(); in makeArrays() local 815 MethodType type = MethodType.genericMethodType(nargs).changeReturnType(Object[].class); in makeArrays() 835 public static MethodHandle varargsArray(int nargs) { in varargsArray() argument 836 if (nargs < ARRAYS.length) in varargsArray() 837 return ARRAYS[nargs]; in varargsArray() 838 return MethodHandles.identity(Object[].class).asCollector(Object[].class, nargs); in varargsArray() [all …]
|
D | InvokeGenericTest.java | 230 static Object[] randomArgs(int nargs, Class<?> param) { in randomArgs() argument 231 Object[] args = new Object[nargs]; in randomArgs() 468 int nargs = args.length; in testReferenceConversions() local 476 if (nargs == 2) { in testReferenceConversions()
|
/libcore/tools/expected_upstream/ |
D | ojluni_modify_expectation.py | 112 nargs=parser_nargs, 116 nargs=parser_nargs, 119 'ojluni_path', nargs='?', help='Destination path in ojluni/') 124 'class_or_ojluni_path', nargs=parser_nargs, help='File path in ojluni/') 127 nargs=parser_nargs, 130 'source_file', nargs='?', help='A upstream source path') 135 'class_or_ojluni_path', nargs=parser_nargs, help='File path in ojluni/')
|
D | ojluni_upgrade_identicals.py | 52 'target_ref', nargs=1, 55 'source_ref', nargs='?',
|
D | ojluni_merge_to_main.py | 580 "-b", "--bug", nargs="?", 583 "-e", "--expected_upstream_base", nargs="?",
|
/libcore/ojluni/src/main/java/java/lang/invoke/ |
D | MethodHandle.java | 1024 int nargs = type().parameterCount(); in asSpreaderChecks() local 1025 if (nargs < arrayLength || arrayLength < 0) in asSpreaderChecks() 1027 if (pos < 0 || pos + arrayLength > nargs) { in asSpreaderChecks() 1247 int nargs = type().parameterCount(); in asCollectorChecks() local 1248 if (pos < 0 || pos >= nargs) { in asCollectorChecks() 1251 if (nargs != 0) { in asCollectorChecks()
|
/libcore/ojluni/src/test/java/lang/invoke/common/test/java/lang/invoke/lib/ |
D | Helper.java | 171 public static MethodHandle addTrailingArgs(MethodHandle target, int nargs, in addTrailingArgs() argument 174 int extra = (nargs - targetLen); in addTrailingArgs() 264 public static Object[] randomArgs(int nargs, Class<?> param) { in randomArgs() argument 265 Object[] args = new Object[nargs]; in randomArgs() 272 public static Object[] randomArgs(int nargs, Class<?>... params) { in randomArgs() argument 273 Object[] args = new Object[nargs]; in randomArgs()
|
/libcore/tools/upstream/ |
D | upstream-diff | 137 parser.add_argument('rel_path', nargs="+",
|
D | merge-from-upstream | 392 parser.add_argument('rel_path', nargs=1, metavar='<relative_path>',
|
D | pkg-status | 412 parser.add_argument('pkgs', nargs="+",
|