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 impl.java.dyn;
27
28 import impl.java.dyn.util.*;
29 import java.dyn.MethodHandle;
30 import java.dyn.MethodHandles;
31 import java.dyn.MethodType;
32
33 /**
34 * General-purpose method handle combinator.
35 * It is invoked on an argument list, and performs whatever processing
36 * is needed, eventually returning the required return value.
37 * Note the distinctions from the low-level adapters supported directly
38 * by the JVM. Those low-level adapters perform argument conversion
39 * and delegate directly to target method handles, without executing
40 * any Java code. These Java-level adapters execute Java code to define
41 * their method handle semantics; whether they delegate to other method
42 * handles (as they often do) is a detail of that Java code.
43 * <p>
44 * If you are creating a method handle for a specific method type,
45 * do not use this class; simply use {@link MethodHandles#bind}.
46 * This class is designed for applications which must be polymorphic
47 * across a range of method types.
48 *
49 * @author jrose
50 */
51 public abstract class JavaMethodHandle {
52 private final MethodType exactType;
53 private final MethodType rawType;
54 private final String rawName;
55
56 // summary of the structure of type
57 //private final int fingerprint;
58
59 /** Intended type of any method handle made from this adapter. */
60 public final MethodType type() {
61 return exactType;
62 }
63
64 /** The (exact) type of my invoke function. */
65 protected final MethodType rawType() {
66 return rawType;
67 }
68
69 /** The name of my categorical invoke function, e.g., invoke_L2. */
70 protected final String rawName() {
71 return rawName;
72 }
73
74 /**
75 * Subclasses must provide the method type which this adapter
76 * implements.
77 * @param type
78 */
79 protected JavaMethodHandle(MethodType type) {
80 this.exactType = type;
81 this.rawType = computeRawType(type);
82 this.rawName = computeRawName(type, rawType);
83 }
84
85 /** Return the type of one of my invoke functions.
86 * Can be extended by subclasses to increase the repertoire
87 * of raw invocation actions.
88 */
89 protected MethodType computeRawType(MethodType type) {
90 return categoricalMethodType(methodTypeCategory(type));
91 }
92
93 /** Return the type of one of my invoke functions.
94 * By default, of the form "invoke_$X$N" where $X is a
95 * single basic-type character (as found in bytecode signatures)
96 * and $N is the (decimal) number of parameters in the raw type.
97 * Can be extended by subclasses to increase the repertoire
98 * of raw invocation actions.
99 */
100 protected String computeRawName(MethodType exactType, MethodType rawType) {
101 char rc = Wrappers.basicTypeChar(rawType.returnType());
102 int nargs = rawType.parameterCount();
103 return "invoke_"+rc+nargs;
104 }
105
106 /** Return a permutation array which tells, for each argument
107 * to the categorical invoker, which incoming argument
108 * will supply the value (perhaps after suitable conversion).
109 * Returns null if the conversions are simply pairwise,
110 * with no reordering of argument values.
111 */
112 protected char[] computePermutation(MethodType exactType, MethodType rawType) {
113 return methodTypeCategoricalPermutation(exactType);
114 }
115
116 protected final RuntimeException illegal() {
117 return new UnsupportedOperationException();
118 }
119
120 /** Produce a method handle that binds the appropriate invoke
121 * method of this combinator.
122 * @return a method handle of this combinator's type
123 */
124 public MethodHandle handle() {
125 //return permuteAndRetypeArguments(rawHandle(), type(), computePermutation());
126 throw new UnsupportedOperationException("NYI");
127 }
128
129 protected MethodHandle rawHandle() {
130 return MethodHandles.bind(this, rawName(), rawType());
131 }
132
133 // Pluggable behaviors, specific to particular arguments or return values.
134 protected Object res(Object x) { return exactType.returnType().cast(x); }
135 protected int res(int x) { return x; }
136 protected long res(long x) { return x; }
137
138 // A categorical method type is one which (a) avoids boxing,
139 // (b) avoids passing unused arguments, and (c) can represent
140 // the calling sequence of an original exact type.
141 //
142 // It's good to limit the number of categorical types,
143 // so that we don't have to generate too many different
144 // code shapes for Java-based adapters.
145 // We (1) erase all references to Object,
146 // (2) widen primitives to int when they fit,
147 // (3) widen other primitive arguments to long,
148 // (4) sort the argument list (refs, ints, then longs), and
149 // (5) promote ints to longs if any longs are present.
150 //
151 // Because it is harmless to ignore an int return value,
152 // if the caller is intending a void result, void can be
153 // erased to int, as with other short primitives.
154 // The distinction in return values between reference,
155 // int, long, float, and double.
156 //
157 // Therefore, the grammar of signatures is:
158 // {Object|int|long|float|double} ( Object* {int* | long*} )
159 // This gives 5(2N+1) as the number of categorical signatures
160 // of N arguments, or 5(N+1)^2 for signatures of <=N arguments.
161 // Clearly some of this needs to get code-generated lazily,
162 // but we supoprt a core set of signatures here.
163
164 protected static int category(Class<?> type) {
165 if (!type.isPrimitive()) return 0;
166 if (type == void.class) return -1;
167 if (Wrappers.bitWidth(type) > 32) return 2;
168 return 1;
169 }
170 protected static Class<?> categoricalType(int cat) {
171 switch (cat) {
172 case 0: return Object.class;
173 case 1: return int.class;
174 case 2: return long.class;
175 case 3: return void.class;
176 }
177 throw new InternalError();
178 }
179 protected static int methodTypeCategory(MethodType type) {
180 int nargs = type.parameterCount();
181 int nprims = 0;
182 int nlongs = 0;
183 for (int i = 0; i < nargs; i++) {
184 int cat = category(type.parameterType(i));
185 if (cat != 0) {
186 ++nprims;
187 if (cat == 2) ++nlongs;
188 }
189 }
190 int nrefs = nargs - nprims;
191 int nints = nprims - nlongs;
192 int rcat = category(type.returnType());
193 if (nlongs != 0) { nlongs += nints; nints = 0; } // point (5)
194 return (nlongs << 24) | (nints << 16) | (nrefs << 8) | rcat;
195 }
196 protected static char[] methodTypeCategoricalPermutation(MethodType type) {
197 return methodTypeCategoricalPermutation(type, methodTypeCategory(type));
198 }
199 protected static char[] methodTypeCategoricalPermutation(MethodType type, int category) {
200 int x = category;
201 int rcat = (x & 0xFF); x >>= 8;
202 int nrefs = (x & 0xFF); x >>= 8;
203 int nints = (x & 0xFF); x >>= 8;
204 int nlongs = (x & 0xFF); x >>= 8;
205 int nargs = type.parameterCount();
206 assert(nargs == nrefs + nints + nlongs);
207 char[] permutation = new char[nargs];
208 int nextref = 0, nextint = nrefs, nextlong = nrefs + nints;
209 int reflimit = nextint, intlimit = nextlong, longlimit = nargs;
210 boolean sawReorder = false;
211 for (int i = 0; i < nargs; i++) {
212 int cat = category(type.parameterType(i));
213 int nextarg;
214 if (cat == 0)
215 nextarg = nextref++;
216 else if (nextint == intlimit || cat == 2)
217 nextarg = nextlong++;
218 else
219 nextarg = nextint++;
220 // Next outgoing argument (to the categorical invoke method)
221 // is going to come from exactType.parameterType(i)
222 assert(permutation[nextarg] == 0);
223 permutation[nextarg] = (char) i;
224 if (nextarg != i) sawReorder = true;
225 }
226 assert(nextref == reflimit);
227 assert(nextint == intlimit);
228 assert(nextlong == longlimit);
229 if (!sawReorder) return null; // this is always a special case
230 return permutation;
231 }
232 protected static MethodType categoricalMethodType(int category) {
233 int x = category;
234 int rcat = (x & 0xFF); x >>= 8;
235 int nrefs = (x & 0xFF); x >>= 8;
236 int nints = (x & 0xFF); x >>= 8;
237 int nlongs = (x & 0xFF); x >>= 8;
238 return categoricalMethodType(rcat, nrefs, nints, nlongs);
239 }
240 protected static MethodType categoricalMethodType(int rcat, int nrefs, int nints, int nlongs) {
241 int nshorts = nints + nlongs;
242 Class<?> ptypes[] = new Class<?>[nshorts + nlongs];
243 int cat = 0;
244 Class<?> ptype = categoricalType(cat);
245 for (int i = 0; i < ptypes.length; i++) {
246 if (i == nrefs) ptype = categoricalType(++cat);
247 if (i == nshorts) ptype = categoricalType(++cat);
248 ptypes[i] = ptype;
249 }
250 Class<?> rtype = categoricalType(rcat);
251 return MethodType.make(rtype, ptypes);
252 }
253
254 // Categorical methods up to arity 5 (180 of them).
255 // They are (arbitrarily) split up in subclasses.
256 /*
257 (defun insert-categorical-methods (max-arity &optional max-rcat)
258 (let* ((types (list "Object" "int " "long " "float " "double"))
259 (tchars (list "L" "I" "J" "F" "D"))
260 invoke acat nrefs
261 (do-case (function (lambda (rcat nargs nrefs nints nlongs)
262 (setq invoke (format "invoke_%s%d" (elt tchars rcat) nargs))
263 (insert "\n protected " (elt types rcat) " " invoke "(")
264 (dotimes (arg nargs)
265 (setq acat (cond ((< arg nrefs) 0) ((< arg (+ nrefs nints)) 1) (t 2)))
266 (insert (if (= 0 arg) "" ", ") (elt types acat) (format " a%d" arg)))
267 (insert ") { throw illegal(); }")))))
268 (dotimes (rcat (1+ (or max-rcat 4))) (dotimes (nargs (1+ max-arity))
269 (setq invoke (format "%s%d" (elt tchars rcat) nargs))
270 (insert "\n static class " invoke " extends JavaMethodHandle {")
271 (insert "\n " invoke "(MethodType type) { super(type); }")
272 (funcall do-case rcat nargs nargs 0 0)
273 (dotimes (j 2) (dotimes (i nargs) (setq nrefs (- nargs i 1))
274 (if (= j 0) (funcall do-case rcat nargs nrefs (- nargs nrefs) 0)
275 (funcall do-case rcat nargs nrefs 0 (- nargs nrefs)))))
276 (insert "\n }")
277 ))))
278 */
279 // (progn (insert-categorical-methods 5 4) (insert "\n}"))
280 /*
281 static class L0 extends JavaMethodHandle {
282 L0(MethodType type) { super(type); }
283 protected Object invoke_L0() { throw illegal(); }
284 }
285 static class L1 extends JavaMethodHandle {
286 L1(MethodType type) { super(type); }
287 protected Object invoke_L1(Object a0) { throw illegal(); }
288 protected Object invoke_L1(int a0) { throw illegal(); }
289 protected Object invoke_L1(long a0) { throw illegal(); }
290 }
291 static class L2 extends JavaMethodHandle {
292 L2(MethodType type) { super(type); }
293 protected Object invoke_L2(Object a0, Object a1) { throw illegal(); }
294 protected Object invoke_L2(Object a0, int a1) { throw illegal(); }
295 protected Object invoke_L2(int a0, int a1) { throw illegal(); }
296 protected Object invoke_L2(Object a0, long a1) { throw illegal(); }
297 protected Object invoke_L2(long a0, long a1) { throw illegal(); }
298 }
299 static class L3 extends JavaMethodHandle {
300 L3(MethodType type) { super(type); }
301 protected Object invoke_L3(Object a0, Object a1, Object a2) { throw illegal(); }
302 protected Object invoke_L3(Object a0, Object a1, int a2) { throw illegal(); }
303 protected Object invoke_L3(Object a0, int a1, int a2) { throw illegal(); }
304 protected Object invoke_L3(int a0, int a1, int a2) { throw illegal(); }
305 protected Object invoke_L3(Object a0, Object a1, long a2) { throw illegal(); }
306 protected Object invoke_L3(Object a0, long a1, long a2) { throw illegal(); }
307 protected Object invoke_L3(long a0, long a1, long a2) { throw illegal(); }
308 }
309 static class L4 extends JavaMethodHandle {
310 L4(MethodType type) { super(type); }
311 protected Object invoke_L4(Object a0, Object a1, Object a2, Object a3) { throw illegal(); }
312 protected Object invoke_L4(Object a0, Object a1, Object a2, int a3) { throw illegal(); }
313 protected Object invoke_L4(Object a0, Object a1, int a2, int a3) { throw illegal(); }
314 protected Object invoke_L4(Object a0, int a1, int a2, int a3) { throw illegal(); }
315 protected Object invoke_L4(int a0, int a1, int a2, int a3) { throw illegal(); }
316 protected Object invoke_L4(Object a0, Object a1, Object a2, long a3) { throw illegal(); }
317 protected Object invoke_L4(Object a0, Object a1, long a2, long a3) { throw illegal(); }
318 protected Object invoke_L4(Object a0, long a1, long a2, long a3) { throw illegal(); }
319 protected Object invoke_L4(long a0, long a1, long a2, long a3) { throw illegal(); }
320 }
321 static class L5 extends JavaMethodHandle {
322 L5(MethodType type) { super(type); }
323 protected Object invoke_L5(Object a0, Object a1, Object a2, Object a3, Object a4) { throw illegal(); }
324 protected Object invoke_L5(Object a0, Object a1, Object a2, Object a3, int a4) { throw illegal(); }
325 protected Object invoke_L5(Object a0, Object a1, Object a2, int a3, int a4) { throw illegal(); }
326 protected Object invoke_L5(Object a0, Object a1, int a2, int a3, int a4) { throw illegal(); }
327 protected Object invoke_L5(Object a0, int a1, int a2, int a3, int a4) { throw illegal(); }
328 protected Object invoke_L5(int a0, int a1, int a2, int a3, int a4) { throw illegal(); }
329 protected Object invoke_L5(Object a0, Object a1, Object a2, Object a3, long a4) { throw illegal(); }
330 protected Object invoke_L5(Object a0, Object a1, Object a2, long a3, long a4) { throw illegal(); }
331 protected Object invoke_L5(Object a0, Object a1, long a2, long a3, long a4) { throw illegal(); }
332 protected Object invoke_L5(Object a0, long a1, long a2, long a3, long a4) { throw illegal(); }
333 protected Object invoke_L5(long a0, long a1, long a2, long a3, long a4) { throw illegal(); }
334 }
335 static class I0 extends JavaMethodHandle {
336 I0(MethodType type) { super(type); }
337 protected int invoke_I0() { throw illegal(); }
338 }
339 static class I1 extends JavaMethodHandle {
340 I1(MethodType type) { super(type); }
341 protected int invoke_I1(Object a0) { throw illegal(); }
342 protected int invoke_I1(int a0) { throw illegal(); }
343 protected int invoke_I1(long a0) { throw illegal(); }
344 }
345 static class I2 extends JavaMethodHandle {
346 I2(MethodType type) { super(type); }
347 protected int invoke_I2(Object a0, Object a1) { throw illegal(); }
348 protected int invoke_I2(Object a0, int a1) { throw illegal(); }
349 protected int invoke_I2(int a0, int a1) { throw illegal(); }
350 protected int invoke_I2(Object a0, long a1) { throw illegal(); }
351 protected int invoke_I2(long a0, long a1) { throw illegal(); }
352 }
353 static class I3 extends JavaMethodHandle {
354 I3(MethodType type) { super(type); }
355 protected int invoke_I3(Object a0, Object a1, Object a2) { throw illegal(); }
356 protected int invoke_I3(Object a0, Object a1, int a2) { throw illegal(); }
357 protected int invoke_I3(Object a0, int a1, int a2) { throw illegal(); }
358 protected int invoke_I3(int a0, int a1, int a2) { throw illegal(); }
359 protected int invoke_I3(Object a0, Object a1, long a2) { throw illegal(); }
360 protected int invoke_I3(Object a0, long a1, long a2) { throw illegal(); }
361 protected int invoke_I3(long a0, long a1, long a2) { throw illegal(); }
362 }
363 static class I4 extends JavaMethodHandle {
364 I4(MethodType type) { super(type); }
365 protected int invoke_I4(Object a0, Object a1, Object a2, Object a3) { throw illegal(); }
366 protected int invoke_I4(Object a0, Object a1, Object a2, int a3) { throw illegal(); }
367 protected int invoke_I4(Object a0, Object a1, int a2, int a3) { throw illegal(); }
368 protected int invoke_I4(Object a0, int a1, int a2, int a3) { throw illegal(); }
369 protected int invoke_I4(int a0, int a1, int a2, int a3) { throw illegal(); }
370 protected int invoke_I4(Object a0, Object a1, Object a2, long a3) { throw illegal(); }
371 protected int invoke_I4(Object a0, Object a1, long a2, long a3) { throw illegal(); }
372 protected int invoke_I4(Object a0, long a1, long a2, long a3) { throw illegal(); }
373 protected int invoke_I4(long a0, long a1, long a2, long a3) { throw illegal(); }
374 }
375 static class I5 extends JavaMethodHandle {
376 I5(MethodType type) { super(type); }
377 protected int invoke_I5(Object a0, Object a1, Object a2, Object a3, Object a4) { throw illegal(); }
378 protected int invoke_I5(Object a0, Object a1, Object a2, Object a3, int a4) { throw illegal(); }
379 protected int invoke_I5(Object a0, Object a1, Object a2, int a3, int a4) { throw illegal(); }
380 protected int invoke_I5(Object a0, Object a1, int a2, int a3, int a4) { throw illegal(); }
381 protected int invoke_I5(Object a0, int a1, int a2, int a3, int a4) { throw illegal(); }
382 protected int invoke_I5(int a0, int a1, int a2, int a3, int a4) { throw illegal(); }
383 protected int invoke_I5(Object a0, Object a1, Object a2, Object a3, long a4) { throw illegal(); }
384 protected int invoke_I5(Object a0, Object a1, Object a2, long a3, long a4) { throw illegal(); }
385 protected int invoke_I5(Object a0, Object a1, long a2, long a3, long a4) { throw illegal(); }
386 protected int invoke_I5(Object a0, long a1, long a2, long a3, long a4) { throw illegal(); }
387 protected int invoke_I5(long a0, long a1, long a2, long a3, long a4) { throw illegal(); }
388 }
389 static class J0 extends JavaMethodHandle {
390 J0(MethodType type) { super(type); }
391 protected long invoke_J0() { throw illegal(); }
392 }
393 static class J1 extends JavaMethodHandle {
394 J1(MethodType type) { super(type); }
395 protected long invoke_J1(Object a0) { throw illegal(); }
396 protected long invoke_J1(int a0) { throw illegal(); }
397 protected long invoke_J1(long a0) { throw illegal(); }
398 }
399 static class J2 extends JavaMethodHandle {
400 J2(MethodType type) { super(type); }
401 protected long invoke_J2(Object a0, Object a1) { throw illegal(); }
402 protected long invoke_J2(Object a0, int a1) { throw illegal(); }
403 protected long invoke_J2(int a0, int a1) { throw illegal(); }
404 protected long invoke_J2(Object a0, long a1) { throw illegal(); }
405 protected long invoke_J2(long a0, long a1) { throw illegal(); }
406 }
407 static class J3 extends JavaMethodHandle {
408 J3(MethodType type) { super(type); }
409 protected long invoke_J3(Object a0, Object a1, Object a2) { throw illegal(); }
410 protected long invoke_J3(Object a0, Object a1, int a2) { throw illegal(); }
411 protected long invoke_J3(Object a0, int a1, int a2) { throw illegal(); }
412 protected long invoke_J3(int a0, int a1, int a2) { throw illegal(); }
413 protected long invoke_J3(Object a0, Object a1, long a2) { throw illegal(); }
414 protected long invoke_J3(Object a0, long a1, long a2) { throw illegal(); }
415 protected long invoke_J3(long a0, long a1, long a2) { throw illegal(); }
416 }
417 static class J4 extends JavaMethodHandle {
418 J4(MethodType type) { super(type); }
419 protected long invoke_J4(Object a0, Object a1, Object a2, Object a3) { throw illegal(); }
420 protected long invoke_J4(Object a0, Object a1, Object a2, int a3) { throw illegal(); }
421 protected long invoke_J4(Object a0, Object a1, int a2, int a3) { throw illegal(); }
422 protected long invoke_J4(Object a0, int a1, int a2, int a3) { throw illegal(); }
423 protected long invoke_J4(int a0, int a1, int a2, int a3) { throw illegal(); }
424 protected long invoke_J4(Object a0, Object a1, Object a2, long a3) { throw illegal(); }
425 protected long invoke_J4(Object a0, Object a1, long a2, long a3) { throw illegal(); }
426 protected long invoke_J4(Object a0, long a1, long a2, long a3) { throw illegal(); }
427 protected long invoke_J4(long a0, long a1, long a2, long a3) { throw illegal(); }
428 }
429 static class J5 extends JavaMethodHandle {
430 J5(MethodType type) { super(type); }
431 protected long invoke_J5(Object a0, Object a1, Object a2, Object a3, Object a4) { throw illegal(); }
432 protected long invoke_J5(Object a0, Object a1, Object a2, Object a3, int a4) { throw illegal(); }
433 protected long invoke_J5(Object a0, Object a1, Object a2, int a3, int a4) { throw illegal(); }
434 protected long invoke_J5(Object a0, Object a1, int a2, int a3, int a4) { throw illegal(); }
435 protected long invoke_J5(Object a0, int a1, int a2, int a3, int a4) { throw illegal(); }
436 protected long invoke_J5(int a0, int a1, int a2, int a3, int a4) { throw illegal(); }
437 protected long invoke_J5(Object a0, Object a1, Object a2, Object a3, long a4) { throw illegal(); }
438 protected long invoke_J5(Object a0, Object a1, Object a2, long a3, long a4) { throw illegal(); }
439 protected long invoke_J5(Object a0, Object a1, long a2, long a3, long a4) { throw illegal(); }
440 protected long invoke_J5(Object a0, long a1, long a2, long a3, long a4) { throw illegal(); }
441 protected long invoke_J5(long a0, long a1, long a2, long a3, long a4) { throw illegal(); }
442 }
443 static class F0 extends JavaMethodHandle {
444 F0(MethodType type) { super(type); }
445 protected float invoke_F0() { throw illegal(); }
446 }
447 static class F1 extends JavaMethodHandle {
448 F1(MethodType type) { super(type); }
449 protected float invoke_F1(Object a0) { throw illegal(); }
450 protected float invoke_F1(int a0) { throw illegal(); }
451 protected float invoke_F1(long a0) { throw illegal(); }
452 }
453 static class F2 extends JavaMethodHandle {
454 F2(MethodType type) { super(type); }
455 protected float invoke_F2(Object a0, Object a1) { throw illegal(); }
456 protected float invoke_F2(Object a0, int a1) { throw illegal(); }
457 protected float invoke_F2(int a0, int a1) { throw illegal(); }
458 protected float invoke_F2(Object a0, long a1) { throw illegal(); }
459 protected float invoke_F2(long a0, long a1) { throw illegal(); }
460 }
461 static class F3 extends JavaMethodHandle {
462 F3(MethodType type) { super(type); }
463 protected float invoke_F3(Object a0, Object a1, Object a2) { throw illegal(); }
464 protected float invoke_F3(Object a0, Object a1, int a2) { throw illegal(); }
465 protected float invoke_F3(Object a0, int a1, int a2) { throw illegal(); }
466 protected float invoke_F3(int a0, int a1, int a2) { throw illegal(); }
467 protected float invoke_F3(Object a0, Object a1, long a2) { throw illegal(); }
468 protected float invoke_F3(Object a0, long a1, long a2) { throw illegal(); }
469 protected float invoke_F3(long a0, long a1, long a2) { throw illegal(); }
470 }
471 static class F4 extends JavaMethodHandle {
472 F4(MethodType type) { super(type); }
473 protected float invoke_F4(Object a0, Object a1, Object a2, Object a3) { throw illegal(); }
474 protected float invoke_F4(Object a0, Object a1, Object a2, int a3) { throw illegal(); }
475 protected float invoke_F4(Object a0, Object a1, int a2, int a3) { throw illegal(); }
476 protected float invoke_F4(Object a0, int a1, int a2, int a3) { throw illegal(); }
477 protected float invoke_F4(int a0, int a1, int a2, int a3) { throw illegal(); }
478 protected float invoke_F4(Object a0, Object a1, Object a2, long a3) { throw illegal(); }
479 protected float invoke_F4(Object a0, Object a1, long a2, long a3) { throw illegal(); }
480 protected float invoke_F4(Object a0, long a1, long a2, long a3) { throw illegal(); }
481 protected float invoke_F4(long a0, long a1, long a2, long a3) { throw illegal(); }
482 }
483 static class F5 extends JavaMethodHandle {
484 F5(MethodType type) { super(type); }
485 protected float invoke_F5(Object a0, Object a1, Object a2, Object a3, Object a4) { throw illegal(); }
486 protected float invoke_F5(Object a0, Object a1, Object a2, Object a3, int a4) { throw illegal(); }
487 protected float invoke_F5(Object a0, Object a1, Object a2, int a3, int a4) { throw illegal(); }
488 protected float invoke_F5(Object a0, Object a1, int a2, int a3, int a4) { throw illegal(); }
489 protected float invoke_F5(Object a0, int a1, int a2, int a3, int a4) { throw illegal(); }
490 protected float invoke_F5(int a0, int a1, int a2, int a3, int a4) { throw illegal(); }
491 protected float invoke_F5(Object a0, Object a1, Object a2, Object a3, long a4) { throw illegal(); }
492 protected float invoke_F5(Object a0, Object a1, Object a2, long a3, long a4) { throw illegal(); }
493 protected float invoke_F5(Object a0, Object a1, long a2, long a3, long a4) { throw illegal(); }
494 protected float invoke_F5(Object a0, long a1, long a2, long a3, long a4) { throw illegal(); }
495 protected float invoke_F5(long a0, long a1, long a2, long a3, long a4) { throw illegal(); }
496 }
497 static class D0 extends JavaMethodHandle {
498 D0(MethodType type) { super(type); }
499 protected double invoke_D0() { throw illegal(); }
500 }
501 static class D1 extends JavaMethodHandle {
502 D1(MethodType type) { super(type); }
503 protected double invoke_D1(Object a0) { throw illegal(); }
504 protected double invoke_D1(int a0) { throw illegal(); }
505 protected double invoke_D1(long a0) { throw illegal(); }
506 }
507 static class D2 extends JavaMethodHandle {
508 D2(MethodType type) { super(type); }
509 protected double invoke_D2(Object a0, Object a1) { throw illegal(); }
510 protected double invoke_D2(Object a0, int a1) { throw illegal(); }
511 protected double invoke_D2(int a0, int a1) { throw illegal(); }
512 protected double invoke_D2(Object a0, long a1) { throw illegal(); }
513 protected double invoke_D2(long a0, long a1) { throw illegal(); }
514 }
515 static class D3 extends JavaMethodHandle {
516 D3(MethodType type) { super(type); }
517 protected double invoke_D3(Object a0, Object a1, Object a2) { throw illegal(); }
518 protected double invoke_D3(Object a0, Object a1, int a2) { throw illegal(); }
519 protected double invoke_D3(Object a0, int a1, int a2) { throw illegal(); }
520 protected double invoke_D3(int a0, int a1, int a2) { throw illegal(); }
521 protected double invoke_D3(Object a0, Object a1, long a2) { throw illegal(); }
522 protected double invoke_D3(Object a0, long a1, long a2) { throw illegal(); }
523 protected double invoke_D3(long a0, long a1, long a2) { throw illegal(); }
524 }
525 static class D4 extends JavaMethodHandle {
526 D4(MethodType type) { super(type); }
527 protected double invoke_D4(Object a0, Object a1, Object a2, Object a3) { throw illegal(); }
528 protected double invoke_D4(Object a0, Object a1, Object a2, int a3) { throw illegal(); }
529 protected double invoke_D4(Object a0, Object a1, int a2, int a3) { throw illegal(); }
530 protected double invoke_D4(Object a0, int a1, int a2, int a3) { throw illegal(); }
531 protected double invoke_D4(int a0, int a1, int a2, int a3) { throw illegal(); }
532 protected double invoke_D4(Object a0, Object a1, Object a2, long a3) { throw illegal(); }
533 protected double invoke_D4(Object a0, Object a1, long a2, long a3) { throw illegal(); }
534 protected double invoke_D4(Object a0, long a1, long a2, long a3) { throw illegal(); }
535 protected double invoke_D4(long a0, long a1, long a2, long a3) { throw illegal(); }
536 }
537 static class D5 extends JavaMethodHandle {
538 D5(MethodType type) { super(type); }
539 protected double invoke_D5(Object a0, Object a1, Object a2, Object a3, Object a4) { throw illegal(); }
540 protected double invoke_D5(Object a0, Object a1, Object a2, Object a3, int a4) { throw illegal(); }
541 protected double invoke_D5(Object a0, Object a1, Object a2, int a3, int a4) { throw illegal(); }
542 protected double invoke_D5(Object a0, Object a1, int a2, int a3, int a4) { throw illegal(); }
543 protected double invoke_D5(Object a0, int a1, int a2, int a3, int a4) { throw illegal(); }
544 protected double invoke_D5(int a0, int a1, int a2, int a3, int a4) { throw illegal(); }
545 protected double invoke_D5(Object a0, Object a1, Object a2, Object a3, long a4) { throw illegal(); }
546 protected double invoke_D5(Object a0, Object a1, Object a2, long a3, long a4) { throw illegal(); }
547 protected double invoke_D5(Object a0, Object a1, long a2, long a3, long a4) { throw illegal(); }
548 protected double invoke_D5(Object a0, long a1, long a2, long a3, long a4) { throw illegal(); }
549 protected double invoke_D5(long a0, long a1, long a2, long a3, long a4) { throw illegal(); }
550 }
551 */
552 }