author | jrose |
Fri, 30 Apr 2010 23:48:23 -0700 | |
changeset 5722 | 4ada807383c8 |
parent 4537 | 7c3c7f8d5195 |
child 5725 | 16c1792b2ee6 |
permissions | -rw-r--r-- |
4537 | 1 |
/* |
2 |
* Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. |
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Sun designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Sun in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
* CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
* have any questions. |
|
24 |
*/ |
|
25 |
||
26 |
package sun.dyn; |
|
27 |
||
28 |
import java.dyn.JavaMethodHandle; |
|
29 |
import java.dyn.MethodHandle; |
|
30 |
import java.dyn.MethodHandles; |
|
31 |
import java.dyn.MethodType; |
|
32 |
import java.dyn.NoAccessException; |
|
33 |
import java.lang.reflect.Constructor; |
|
34 |
import java.lang.reflect.InvocationTargetException; |
|
35 |
import java.util.ArrayList; |
|
36 |
import sun.dyn.util.ValueConversions; |
|
37 |
import static sun.dyn.MemberName.newIllegalArgumentException; |
|
38 |
||
39 |
/** |
|
40 |
* Generic spread adapter. |
|
41 |
* Expands a final argument into multiple (zero or more) arguments, keeping the others the same. |
|
42 |
* @author jrose |
|
43 |
*/ |
|
44 |
class SpreadGeneric { |
|
45 |
// type for the outgoing call |
|
46 |
private final MethodType targetType; |
|
47 |
// number of arguments to spread |
|
48 |
private final int spreadCount; |
|
49 |
// prototype adapter (clone and customize for each new target!) |
|
50 |
private final Adapter adapter; |
|
51 |
// entry point for adapter (Adapter mh, a...) => ... |
|
52 |
private final MethodHandle entryPoint; |
|
53 |
||
54 |
/** Compute and cache information common to all spreading adapters |
|
55 |
* that accept calls of the given (generic) type. |
|
56 |
*/ |
|
57 |
private SpreadGeneric(MethodType targetType, int spreadCount) { |
|
58 |
assert(targetType == targetType.generic()); |
|
59 |
this.targetType = targetType; |
|
60 |
this.spreadCount = spreadCount; |
|
61 |
// the target invoker will generally need casts on reference arguments |
|
62 |
MethodHandle[] ep = { null }; |
|
63 |
Adapter ad = findAdapter(this, ep); |
|
64 |
if (ad != null) { |
|
65 |
this.adapter = ad; |
|
66 |
this.entryPoint = ep[0]; |
|
67 |
return; |
|
68 |
} |
|
69 |
this.adapter = buildAdapterFromBytecodes(targetType, spreadCount, ep); |
|
70 |
this.entryPoint = ep[0]; |
|
71 |
} |
|
72 |
||
73 |
/** From targetType remove the last spreadCount arguments, and instead |
|
74 |
* append a simple Object argument. |
|
75 |
*/ |
|
76 |
static MethodType preSpreadType(MethodType targetType, int spreadCount) { |
|
77 |
@SuppressWarnings("unchecked") |
|
78 |
ArrayList<Class<?>> params = new ArrayList(targetType.parameterList()); |
|
79 |
int outargs = params.size(); |
|
80 |
params.subList(outargs - spreadCount, outargs).clear(); |
|
81 |
params.add(Object.class); |
|
82 |
return MethodType.methodType(targetType.returnType(), params); |
|
83 |
} |
|
84 |
||
85 |
MethodHandle makeInstance(MethodHandle target) { |
|
86 |
MethodType type = target.type(); |
|
87 |
if (type != targetType) { |
|
88 |
throw new UnsupportedOperationException("NYI type="+type); |
|
89 |
} |
|
90 |
return adapter.makeInstance(this, target); |
|
91 |
} |
|
92 |
||
93 |
/** Build an adapter of the given generic type, which invokes typedTarget |
|
94 |
* on the incoming arguments, after unboxing as necessary. |
|
95 |
* The return value is boxed if necessary. |
|
96 |
* @param genericType the required type of the result |
|
97 |
* @param typedTarget the target |
|
98 |
* @return an adapter method handle |
|
99 |
*/ |
|
100 |
public static MethodHandle make(MethodHandle target, int spreadCount) { |
|
101 |
MethodType type = target.type(); |
|
102 |
MethodType gtype = type.generic(); |
|
103 |
if (type == gtype) { |
|
104 |
return SpreadGeneric.of(type, spreadCount).makeInstance(target); |
|
105 |
} else { |
|
106 |
MethodHandle gtarget = FromGeneric.make(target); |
|
107 |
assert(gtarget.type() == gtype); |
|
108 |
MethodHandle gspread = SpreadGeneric.of(gtype, spreadCount).makeInstance(gtarget); |
|
109 |
return ToGeneric.make(preSpreadType(type, spreadCount), gspread); |
|
110 |
} |
|
111 |
} |
|
112 |
||
113 |
/** Return the adapter information for this type's erasure. */ |
|
114 |
static SpreadGeneric of(MethodType targetType, int spreadCount) { |
|
115 |
if (targetType != targetType.generic()) |
|
116 |
throw new UnsupportedOperationException("NYI type="+targetType); |
|
117 |
MethodTypeImpl form = MethodTypeImpl.of(targetType); |
|
118 |
int outcount = form.parameterCount(); |
|
119 |
assert(spreadCount <= outcount); |
|
120 |
SpreadGeneric[] spreadGens = form.spreadGeneric; |
|
121 |
if (spreadGens == null) |
|
122 |
form.spreadGeneric = spreadGens = new SpreadGeneric[outcount+1]; |
|
123 |
SpreadGeneric spreadGen = spreadGens[spreadCount]; |
|
124 |
if (spreadGen == null) |
|
125 |
spreadGens[spreadCount] = spreadGen = new SpreadGeneric(form.erasedType(), spreadCount); |
|
126 |
return spreadGen; |
|
127 |
} |
|
128 |
||
129 |
public String toString() { |
|
130 |
return getClass().getSimpleName()+targetType+"["+spreadCount+"]"; |
|
131 |
} |
|
132 |
||
133 |
// This mini-api is called from an Adapter to manage the spread. |
|
134 |
/** A check/coercion that happens once before any selections. */ |
|
135 |
protected Object check(Object av, int n) { |
|
136 |
MethodHandleImpl.checkSpreadArgument(av, n); |
|
137 |
return av; |
|
138 |
} |
|
139 |
||
140 |
/** The selection operator for spreading; note that it takes Object not Object[]. */ |
|
141 |
protected Object select(Object av, int n) { |
|
142 |
return ((Object[])av)[n]; |
|
143 |
} |
|
144 |
/* |
|
145 |
protected int select_I(Object av, int n) { |
|
146 |
// maybe return ((int[])select)[n] |
|
147 |
throw new UnsupportedOperationException("subclass resp."); |
|
148 |
} |
|
149 |
protected int select_J(Object av, int n) { |
|
150 |
// maybe return ((long[])select)[n] |
|
151 |
throw new UnsupportedOperationException("subclass resp."); |
|
152 |
} |
|
153 |
// */ |
|
154 |
||
155 |
/* Create an adapter that handles spreading calls for the given type. */ |
|
156 |
static Adapter findAdapter(SpreadGeneric outer, MethodHandle[] ep) { |
|
157 |
MethodType targetType = outer.targetType; |
|
158 |
int spreadCount = outer.spreadCount; |
|
159 |
int outargs = targetType.parameterCount(); |
|
160 |
int inargs = outargs - spreadCount; |
|
161 |
if (inargs < 0) return null; |
|
162 |
MethodType entryType = MethodType.genericMethodType(inargs + 1); // 1 for av |
|
163 |
String cname1 = "S" + outargs; |
|
164 |
String[] cnames = { cname1 }; |
|
165 |
String iname = "invoke_S"+spreadCount; |
|
166 |
// e.g., D5I2, D5, L5I2, L5; invoke_D5 |
|
167 |
for (String cname : cnames) { |
|
168 |
Class<? extends Adapter> acls = Adapter.findSubClass(cname); |
|
169 |
if (acls == null) continue; |
|
170 |
// see if it has the required invoke method |
|
171 |
MethodHandle entryPoint = null; |
|
172 |
try { |
|
173 |
entryPoint = MethodHandleImpl.IMPL_LOOKUP.findSpecial(acls, iname, entryType, acls); |
|
174 |
} catch (NoAccessException ex) { |
|
175 |
} |
|
176 |
if (entryPoint == null) continue; |
|
177 |
Constructor<? extends Adapter> ctor = null; |
|
178 |
try { |
|
179 |
ctor = acls.getDeclaredConstructor(SpreadGeneric.class); |
|
180 |
} catch (NoSuchMethodException ex) { |
|
181 |
} catch (SecurityException ex) { |
|
182 |
} |
|
183 |
if (ctor == null) continue; |
|
184 |
try { |
|
185 |
// Produce an instance configured as a prototype. |
|
186 |
Adapter ad = ctor.newInstance(outer); |
|
187 |
ep[0] = entryPoint; |
|
188 |
return ad; |
|
189 |
} catch (IllegalArgumentException ex) { |
|
190 |
} catch (InvocationTargetException wex) { |
|
191 |
Throwable ex = wex.getTargetException(); |
|
192 |
if (ex instanceof Error) throw (Error)ex; |
|
193 |
if (ex instanceof RuntimeException) throw (RuntimeException)ex; |
|
194 |
} catch (InstantiationException ex) { |
|
195 |
} catch (IllegalAccessException ex) { |
|
196 |
} |
|
197 |
} |
|
198 |
return null; |
|
199 |
} |
|
200 |
||
201 |
static Adapter buildAdapterFromBytecodes(MethodType targetType, |
|
202 |
int spreadCount, MethodHandle[] ep) { |
|
203 |
throw new UnsupportedOperationException("NYI"); |
|
204 |
} |
|
205 |
||
206 |
/** |
|
207 |
* This adapter takes some untyped arguments, and returns an untyped result. |
|
208 |
* Internally, it applies the invoker to the target, which causes the |
|
209 |
* objects to be unboxed; the result is a raw type in L/I/J/F/D. |
|
210 |
* This result is passed to convert, which is responsible for |
|
211 |
* converting the raw result into a boxed object. |
|
212 |
* The invoker is kept separate from the target because it can be |
|
213 |
* generated once per type erasure family, and reused across adapters. |
|
214 |
*/ |
|
215 |
static abstract class Adapter extends JavaMethodHandle { |
|
216 |
/* |
|
217 |
* class X<<R,int M,int N>> extends Adapter { |
|
218 |
* (Object**N)=>R target; |
|
219 |
* static int S = N-M; |
|
220 |
* Object invoke(Object**M a, Object v) = target(a..., v[0]...v[S-1]); |
|
221 |
* } |
|
222 |
*/ |
|
223 |
protected final SpreadGeneric outer; |
|
224 |
protected final MethodHandle target; // (any**N) => R |
|
225 |
||
226 |
@Override |
|
227 |
public String toString() { |
|
228 |
return target.toString(); |
|
229 |
} |
|
230 |
||
231 |
static final MethodHandle NO_ENTRY = ValueConversions.identity(); |
|
232 |
||
233 |
protected boolean isPrototype() { return target == null; } |
|
234 |
protected Adapter(SpreadGeneric outer) { |
|
235 |
super(NO_ENTRY); |
|
236 |
this.outer = outer; |
|
237 |
this.target = null; |
|
238 |
assert(isPrototype()); |
|
239 |
} |
|
240 |
||
241 |
protected Adapter(SpreadGeneric outer, MethodHandle target) { |
|
242 |
super(outer.entryPoint); |
|
243 |
this.outer = outer; |
|
244 |
this.target = target; |
|
245 |
} |
|
246 |
||
247 |
/** Make a copy of self, with new fields. */ |
|
248 |
protected abstract Adapter makeInstance(SpreadGeneric outer, MethodHandle target); |
|
249 |
// { return new ThisType(outer, target); } |
|
250 |
||
251 |
protected Object check(Object av, int n) { |
|
252 |
return outer.check(av, n); |
|
253 |
} |
|
254 |
protected Object select(Object av, int n) { |
|
255 |
return outer.select(av, n); |
|
256 |
} |
|
257 |
||
258 |
static private final String CLASS_PREFIX; // "sun.dyn.SpreadGeneric$" |
|
259 |
static { |
|
260 |
String aname = Adapter.class.getName(); |
|
261 |
String sname = Adapter.class.getSimpleName(); |
|
262 |
if (!aname.endsWith(sname)) throw new InternalError(); |
|
263 |
CLASS_PREFIX = aname.substring(0, aname.length() - sname.length()); |
|
264 |
} |
|
265 |
/** Find a sibing class of Adapter. */ |
|
266 |
static Class<? extends Adapter> findSubClass(String name) { |
|
267 |
String cname = Adapter.CLASS_PREFIX + name; |
|
268 |
try { |
|
269 |
return Class.forName(cname).asSubclass(Adapter.class); |
|
270 |
} catch (ClassNotFoundException ex) { |
|
271 |
return null; |
|
272 |
} catch (ClassCastException ex) { |
|
273 |
return null; |
|
274 |
} |
|
275 |
} |
|
276 |
} |
|
277 |
||
278 |
/* generated classes follow this pattern: |
|
279 |
static class xS2 extends Adapter { |
|
280 |
protected xS2(SpreadGeneric outer) { super(outer); } // to build prototype |
|
281 |
protected xS2(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
282 |
protected xS2 makeInstance(SpreadGeneric outer, MethodHandle t) { return new xS2(outer, t); } |
|
283 |
protected Object invoke_S0(Object a0, Object a1, Object av) throws Throwable { av = super.check(av,0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
284 |
return target.<Object>invokeExact(a0, a1)); } |
4537 | 285 |
protected Object invoke_S1(Object a0, Object av) throws Throwable { av = super.check(av,1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
286 |
return target.<Object>invokeExact(a0, |
4537 | 287 |
super.select(av,0)); } |
288 |
protected Object invoke_S2(Object a0, Object av) throws Throwable { av = super.check(av,1); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
289 |
return target.<Object>invokeExact( |
4537 | 290 |
super.select(av,0), super.select(av,1)); } |
291 |
} |
|
292 |
// */ |
|
293 |
||
294 |
/* |
|
295 |
: SHELL; n=SpreadGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -cp . genclasses) >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~ |
|
296 |
//{{{ |
|
297 |
import java.util.*; |
|
298 |
class genclasses { |
|
299 |
static String[][] TEMPLATES = { { |
|
300 |
"@for@ N=0..10", |
|
301 |
" //@each-cat@", |
|
302 |
" static class @cat@ extends Adapter {", |
|
303 |
" protected @cat@(SpreadGeneric outer) { super(outer); } // to build prototype", |
|
304 |
" protected @cat@(SpreadGeneric outer, MethodHandle t) { super(outer, t); }", |
|
305 |
" protected @cat@ makeInstance(SpreadGeneric outer, MethodHandle t) { return new @cat@(outer, t); }", |
|
306 |
" protected Object invoke_S0(@Tvav,@Object av) throws Throwable { av = super.check(av, 0);", |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
307 |
" return target.<Object>invokeExact(@av@); }", |
4537 | 308 |
" //@each-S@", |
309 |
" protected Object invoke_S@S@(@Tvav,@Object av) throws Throwable { av = super.check(av, @S@);", |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
310 |
" return target.<Object>invokeExact(@av,@@sv@); }", |
4537 | 311 |
" //@end-S@", |
312 |
" }", |
|
313 |
} }; |
|
314 |
static final String NEWLINE_INDENT = "\n "; |
|
315 |
enum VAR { |
|
316 |
cat, N, S, av, av_, Tvav_, sv; |
|
317 |
public final String pattern = "@"+toString().replace('_','.')+"@"; |
|
318 |
public String binding = toString(); |
|
319 |
static void makeBindings(boolean topLevel, int outargs, int spread) { |
|
320 |
int inargs = outargs - spread; |
|
321 |
VAR.cat.binding = "S"+outargs; |
|
322 |
VAR.N.binding = String.valueOf(outargs); // outgoing arg count |
|
323 |
VAR.S.binding = String.valueOf(spread); // spread count |
|
324 |
String[] av = new String[inargs]; |
|
325 |
String[] Tvav = new String[inargs]; |
|
326 |
for (int i = 0; i < inargs; i++) { |
|
327 |
av[i] = arg(i); |
|
328 |
Tvav[i] = param("Object", av[i]); |
|
329 |
} |
|
330 |
VAR.av.binding = comma(av); |
|
331 |
VAR.av_.binding = comma(av, ", "); |
|
332 |
VAR.Tvav_.binding = comma(Tvav, ", "); |
|
333 |
String[] sv = new String[spread]; |
|
334 |
for (int i = 0; i < spread; i++) { |
|
335 |
String spc = ""; |
|
336 |
if (i % 4 == 0) spc = NEWLINE_INDENT; |
|
337 |
sv[i] = spc+"super.select(av,"+i+")"; |
|
338 |
} |
|
339 |
VAR.sv.binding = comma(sv); |
|
340 |
} |
|
341 |
static String arg(int i) { return "a"+i; } |
|
342 |
static String param(String t, String a) { return t+" "+a; } |
|
343 |
static String comma(String[] v) { return comma(v, ""); } |
|
344 |
static String comma(String[] v, String sep) { |
|
345 |
if (v.length == 0) return ""; |
|
346 |
String res = v[0]; |
|
347 |
for (int i = 1; i < v.length; i++) res += ", "+v[i]; |
|
348 |
return res + sep; |
|
349 |
} |
|
350 |
static String transform(String string) { |
|
351 |
for (VAR var : values()) |
|
352 |
string = string.replaceAll(var.pattern, var.binding); |
|
353 |
return string; |
|
354 |
} |
|
355 |
} |
|
356 |
static String[] stringsIn(String[] strings, int beg, int end) { |
|
357 |
return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length)); |
|
358 |
} |
|
359 |
static String[] stringsBefore(String[] strings, int pos) { |
|
360 |
return stringsIn(strings, 0, pos); |
|
361 |
} |
|
362 |
static String[] stringsAfter(String[] strings, int pos) { |
|
363 |
return stringsIn(strings, pos, strings.length); |
|
364 |
} |
|
365 |
static int indexAfter(String[] strings, int pos, String tag) { |
|
366 |
return Math.min(indexBefore(strings, pos, tag) + 1, strings.length); |
|
367 |
} |
|
368 |
static int indexBefore(String[] strings, int pos, String tag) { |
|
369 |
for (int i = pos, end = strings.length; ; i++) { |
|
370 |
if (i == end || strings[i].endsWith(tag)) return i; |
|
371 |
} |
|
372 |
} |
|
373 |
static int MIN_ARITY, MAX_ARITY; |
|
374 |
public static void main(String... av) { |
|
375 |
for (String[] template : TEMPLATES) { |
|
376 |
int forLinesLimit = indexBefore(template, 0, "@each-cat@"); |
|
377 |
String[] forLines = stringsBefore(template, forLinesLimit); |
|
378 |
template = stringsAfter(template, forLinesLimit); |
|
379 |
for (String forLine : forLines) |
|
380 |
expandTemplate(forLine, template); |
|
381 |
} |
|
382 |
} |
|
383 |
static void expandTemplate(String forLine, String[] template) { |
|
384 |
String[] params = forLine.split("[^0-9]+"); |
|
385 |
if (params[0].length() == 0) params = stringsAfter(params, 1); |
|
386 |
System.out.println("//params="+Arrays.asList(params)); |
|
387 |
int pcur = 0; |
|
388 |
MIN_ARITY = Integer.valueOf(params[pcur++]); |
|
389 |
MAX_ARITY = Integer.valueOf(params[pcur++]); |
|
390 |
if (pcur != params.length) throw new RuntimeException("bad extra param: "+forLine); |
|
391 |
for (int outargs = MIN_ARITY; outargs <= MAX_ARITY; outargs++) { |
|
392 |
expandTemplate(template, true, outargs, 0); |
|
393 |
} |
|
394 |
} |
|
395 |
static void expandTemplate(String[] template, boolean topLevel, int outargs, int spread) { |
|
396 |
VAR.makeBindings(topLevel, outargs, spread); |
|
397 |
for (int i = 0; i < template.length; i++) { |
|
398 |
String line = template[i]; |
|
399 |
if (line.endsWith("@each-cat@")) { |
|
400 |
// ignore |
|
401 |
} else if (line.endsWith("@each-S@")) { |
|
402 |
int blockEnd = indexAfter(template, i, "@end-S@"); |
|
403 |
String[] block = stringsIn(template, i+1, blockEnd-1); |
|
404 |
for (int spread1 = spread+1; spread1 <= outargs; spread1++) |
|
405 |
expandTemplate(block, false, outargs, spread1); |
|
406 |
VAR.makeBindings(topLevel, outargs, spread); |
|
407 |
i = blockEnd-1; continue; |
|
408 |
} else { |
|
409 |
System.out.println(VAR.transform(line)); |
|
410 |
} |
|
411 |
} |
|
412 |
} |
|
413 |
} |
|
414 |
//}}} */ |
|
415 |
//params=[0, 10] |
|
416 |
static class S0 extends Adapter { |
|
417 |
protected S0(SpreadGeneric outer) { super(outer); } // to build prototype |
|
418 |
protected S0(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
419 |
protected S0 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S0(outer, t); } |
|
420 |
protected Object invoke_S0(Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
421 |
return target.<Object>invokeExact(); } |
4537 | 422 |
} |
423 |
static class S1 extends Adapter { |
|
424 |
protected S1(SpreadGeneric outer) { super(outer); } // to build prototype |
|
425 |
protected S1(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
426 |
protected S1 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S1(outer, t); } |
|
427 |
protected Object invoke_S0(Object a0, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
428 |
return target.<Object>invokeExact(a0); } |
4537 | 429 |
protected Object invoke_S1(Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
430 |
return target.<Object>invokeExact( |
4537 | 431 |
super.select(av,0)); } |
432 |
} |
|
433 |
static class S2 extends Adapter { |
|
434 |
protected S2(SpreadGeneric outer) { super(outer); } // to build prototype |
|
435 |
protected S2(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
436 |
protected S2 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S2(outer, t); } |
|
437 |
protected Object invoke_S0(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
438 |
return target.<Object>invokeExact(a0, a1); } |
4537 | 439 |
protected Object invoke_S1(Object a0, Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
440 |
return target.<Object>invokeExact(a0, |
4537 | 441 |
super.select(av,0)); } |
442 |
protected Object invoke_S2(Object av) throws Throwable { av = super.check(av, 2); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
443 |
return target.<Object>invokeExact( |
4537 | 444 |
super.select(av,0), super.select(av,1)); } |
445 |
} |
|
446 |
static class S3 extends Adapter { |
|
447 |
protected S3(SpreadGeneric outer) { super(outer); } // to build prototype |
|
448 |
protected S3(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
449 |
protected S3 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S3(outer, t); } |
|
450 |
protected Object invoke_S0(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
451 |
return target.<Object>invokeExact(a0, a1, a2); } |
4537 | 452 |
protected Object invoke_S1(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
453 |
return target.<Object>invokeExact(a0, a1, |
4537 | 454 |
super.select(av,0)); } |
455 |
protected Object invoke_S2(Object a0, Object av) throws Throwable { av = super.check(av, 2); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
456 |
return target.<Object>invokeExact(a0, |
4537 | 457 |
super.select(av,0), super.select(av,1)); } |
458 |
protected Object invoke_S3(Object av) throws Throwable { av = super.check(av, 3); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
459 |
return target.<Object>invokeExact( |
4537 | 460 |
super.select(av,0), super.select(av,1), super.select(av,2)); } |
461 |
} |
|
462 |
static class S4 extends Adapter { |
|
463 |
protected S4(SpreadGeneric outer) { super(outer); } // to build prototype |
|
464 |
protected S4(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
465 |
protected S4 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S4(outer, t); } |
|
466 |
protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
467 |
return target.<Object>invokeExact(a0, a1, a2, a3); } |
4537 | 468 |
protected Object invoke_S1(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
469 |
return target.<Object>invokeExact(a0, a1, a2, |
4537 | 470 |
super.select(av,0)); } |
471 |
protected Object invoke_S2(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 2); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
472 |
return target.<Object>invokeExact(a0, a1, |
4537 | 473 |
super.select(av,0), super.select(av,1)); } |
474 |
protected Object invoke_S3(Object a0, Object av) throws Throwable { av = super.check(av, 3); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
475 |
return target.<Object>invokeExact(a0, |
4537 | 476 |
super.select(av,0), super.select(av,1), super.select(av,2)); } |
477 |
protected Object invoke_S4(Object av) throws Throwable { av = super.check(av, 4); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
478 |
return target.<Object>invokeExact( |
4537 | 479 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); } |
480 |
} |
|
481 |
static class S5 extends Adapter { |
|
482 |
protected S5(SpreadGeneric outer) { super(outer); } // to build prototype |
|
483 |
protected S5(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
484 |
protected S5 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S5(outer, t); } |
|
485 |
protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
486 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4); } |
4537 | 487 |
protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
488 |
return target.<Object>invokeExact(a0, a1, a2, a3, |
4537 | 489 |
super.select(av,0)); } |
490 |
protected Object invoke_S2(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 2); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
491 |
return target.<Object>invokeExact(a0, a1, a2, |
4537 | 492 |
super.select(av,0), super.select(av,1)); } |
493 |
protected Object invoke_S3(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 3); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
494 |
return target.<Object>invokeExact(a0, a1, |
4537 | 495 |
super.select(av,0), super.select(av,1), super.select(av,2)); } |
496 |
protected Object invoke_S4(Object a0, Object av) throws Throwable { av = super.check(av, 4); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
497 |
return target.<Object>invokeExact(a0, |
4537 | 498 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); } |
499 |
protected Object invoke_S5(Object av) throws Throwable { av = super.check(av, 5); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
500 |
return target.<Object>invokeExact( |
4537 | 501 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
502 |
super.select(av,4)); } |
|
503 |
} |
|
504 |
static class S6 extends Adapter { |
|
505 |
protected S6(SpreadGeneric outer) { super(outer); } // to build prototype |
|
506 |
protected S6(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
507 |
protected S6 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S6(outer, t); } |
|
508 |
protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
509 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5); } |
4537 | 510 |
protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
511 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, |
4537 | 512 |
super.select(av,0)); } |
513 |
protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 2); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
514 |
return target.<Object>invokeExact(a0, a1, a2, a3, |
4537 | 515 |
super.select(av,0), super.select(av,1)); } |
516 |
protected Object invoke_S3(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 3); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
517 |
return target.<Object>invokeExact(a0, a1, a2, |
4537 | 518 |
super.select(av,0), super.select(av,1), super.select(av,2)); } |
519 |
protected Object invoke_S4(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 4); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
520 |
return target.<Object>invokeExact(a0, a1, |
4537 | 521 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); } |
522 |
protected Object invoke_S5(Object a0, Object av) throws Throwable { av = super.check(av, 5); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
523 |
return target.<Object>invokeExact(a0, |
4537 | 524 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
525 |
super.select(av,4)); } |
|
526 |
protected Object invoke_S6(Object av) throws Throwable { av = super.check(av, 6); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
527 |
return target.<Object>invokeExact( |
4537 | 528 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
529 |
super.select(av,4), super.select(av,5)); } |
|
530 |
} |
|
531 |
static class S7 extends Adapter { |
|
532 |
protected S7(SpreadGeneric outer) { super(outer); } // to build prototype |
|
533 |
protected S7(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
534 |
protected S7 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S7(outer, t); } |
|
535 |
protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
536 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6); } |
4537 | 537 |
protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
538 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, |
4537 | 539 |
super.select(av,0)); } |
540 |
protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 2); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
541 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, |
4537 | 542 |
super.select(av,0), super.select(av,1)); } |
543 |
protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 3); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
544 |
return target.<Object>invokeExact(a0, a1, a2, a3, |
4537 | 545 |
super.select(av,0), super.select(av,1), super.select(av,2)); } |
546 |
protected Object invoke_S4(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 4); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
547 |
return target.<Object>invokeExact(a0, a1, a2, |
4537 | 548 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); } |
549 |
protected Object invoke_S5(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 5); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
550 |
return target.<Object>invokeExact(a0, a1, |
4537 | 551 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
552 |
super.select(av,4)); } |
|
553 |
protected Object invoke_S6(Object a0, Object av) throws Throwable { av = super.check(av, 6); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
554 |
return target.<Object>invokeExact(a0, |
4537 | 555 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
556 |
super.select(av,4), super.select(av,5)); } |
|
557 |
protected Object invoke_S7(Object av) throws Throwable { av = super.check(av, 7); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
558 |
return target.<Object>invokeExact( |
4537 | 559 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
560 |
super.select(av,4), super.select(av,5), super.select(av,6)); } |
|
561 |
} |
|
562 |
static class S8 extends Adapter { |
|
563 |
protected S8(SpreadGeneric outer) { super(outer); } // to build prototype |
|
564 |
protected S8(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
565 |
protected S8 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S8(outer, t); } |
|
566 |
protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
567 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7); } |
4537 | 568 |
protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
569 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, |
4537 | 570 |
super.select(av,0)); } |
571 |
protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 2); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
572 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, |
4537 | 573 |
super.select(av,0), super.select(av,1)); } |
574 |
protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 3); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
575 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, |
4537 | 576 |
super.select(av,0), super.select(av,1), super.select(av,2)); } |
577 |
protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 4); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
578 |
return target.<Object>invokeExact(a0, a1, a2, a3, |
4537 | 579 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); } |
580 |
protected Object invoke_S5(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 5); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
581 |
return target.<Object>invokeExact(a0, a1, a2, |
4537 | 582 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
583 |
super.select(av,4)); } |
|
584 |
protected Object invoke_S6(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 6); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
585 |
return target.<Object>invokeExact(a0, a1, |
4537 | 586 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
587 |
super.select(av,4), super.select(av,5)); } |
|
588 |
protected Object invoke_S7(Object a0, Object av) throws Throwable { av = super.check(av, 7); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
589 |
return target.<Object>invokeExact(a0, |
4537 | 590 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
591 |
super.select(av,4), super.select(av,5), super.select(av,6)); } |
|
592 |
protected Object invoke_S8(Object av) throws Throwable { av = super.check(av, 8); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
593 |
return target.<Object>invokeExact( |
4537 | 594 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
595 |
super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); } |
|
596 |
} |
|
597 |
static class S9 extends Adapter { |
|
598 |
protected S9(SpreadGeneric outer) { super(outer); } // to build prototype |
|
599 |
protected S9(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
600 |
protected S9 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S9(outer, t); } |
|
601 |
protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
602 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8); } |
4537 | 603 |
protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
604 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, |
4537 | 605 |
super.select(av,0)); } |
606 |
protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 2); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
607 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, |
4537 | 608 |
super.select(av,0), super.select(av,1)); } |
609 |
protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 3); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
610 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, |
4537 | 611 |
super.select(av,0), super.select(av,1), super.select(av,2)); } |
612 |
protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 4); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
613 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, |
4537 | 614 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); } |
615 |
protected Object invoke_S5(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 5); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
616 |
return target.<Object>invokeExact(a0, a1, a2, a3, |
4537 | 617 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
618 |
super.select(av,4)); } |
|
619 |
protected Object invoke_S6(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 6); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
620 |
return target.<Object>invokeExact(a0, a1, a2, |
4537 | 621 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
622 |
super.select(av,4), super.select(av,5)); } |
|
623 |
protected Object invoke_S7(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 7); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
624 |
return target.<Object>invokeExact(a0, a1, |
4537 | 625 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
626 |
super.select(av,4), super.select(av,5), super.select(av,6)); } |
|
627 |
protected Object invoke_S8(Object a0, Object av) throws Throwable { av = super.check(av, 8); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
628 |
return target.<Object>invokeExact(a0, |
4537 | 629 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
630 |
super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); } |
|
631 |
protected Object invoke_S9(Object av) throws Throwable { av = super.check(av, 9); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
632 |
return target.<Object>invokeExact( |
4537 | 633 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
634 |
super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7), |
|
635 |
super.select(av,8)); } |
|
636 |
} |
|
637 |
static class S10 extends Adapter { |
|
638 |
protected S10(SpreadGeneric outer) { super(outer); } // to build prototype |
|
639 |
protected S10(SpreadGeneric outer, MethodHandle t) { super(outer, t); } |
|
640 |
protected S10 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S10(outer, t); } |
|
641 |
protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9, Object av) throws Throwable { av = super.check(av, 0); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
642 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); } |
4537 | 643 |
protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object av) throws Throwable { av = super.check(av, 1); |
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
644 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, |
4537 | 645 |
super.select(av,0)); } |
646 |
protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 2); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
647 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, |
4537 | 648 |
super.select(av,0), super.select(av,1)); } |
649 |
protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 3); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
650 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, |
4537 | 651 |
super.select(av,0), super.select(av,1), super.select(av,2)); } |
652 |
protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 4); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
653 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, |
4537 | 654 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); } |
655 |
protected Object invoke_S5(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 5); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
656 |
return target.<Object>invokeExact(a0, a1, a2, a3, a4, |
4537 | 657 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
658 |
super.select(av,4)); } |
|
659 |
protected Object invoke_S6(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 6); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
660 |
return target.<Object>invokeExact(a0, a1, a2, a3, |
4537 | 661 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
662 |
super.select(av,4), super.select(av,5)); } |
|
663 |
protected Object invoke_S7(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 7); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
664 |
return target.<Object>invokeExact(a0, a1, a2, |
4537 | 665 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
666 |
super.select(av,4), super.select(av,5), super.select(av,6)); } |
|
667 |
protected Object invoke_S8(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 8); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
668 |
return target.<Object>invokeExact(a0, a1, |
4537 | 669 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
670 |
super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); } |
|
671 |
protected Object invoke_S9(Object a0, Object av) throws Throwable { av = super.check(av, 9); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
672 |
return target.<Object>invokeExact(a0, |
4537 | 673 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
674 |
super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7), |
|
675 |
super.select(av,8)); } |
|
676 |
protected Object invoke_S10(Object av) throws Throwable { av = super.check(av, 10); |
|
5722
4ada807383c8
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
4537
diff
changeset
|
677 |
return target.<Object>invokeExact( |
4537 | 678 |
super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3), |
679 |
super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7), |
|
680 |
super.select(av,8), super.select(av,9)); } |
|
681 |
} |
|
682 |
} |