20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang.invoke;
27
28 import java.util.Arrays;
29 import sun.invoke.empty.Empty;
30 import static java.lang.invoke.MethodHandleStatics.*;
31 import static java.lang.invoke.MethodHandleNatives.Constants.*;
32 import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
33 import static java.lang.invoke.LambdaForm.*;
34
35 /**
36 * Construction and caching of often-used invokers.
37 * @author jrose
38 */
39 class Invokers {
40 // exact type (sans leading taget MH) for the outgoing call
41 private final MethodType targetType;
42
43 // FIXME: Get rid of the invokers that are not useful.
44
45 // exact invoker for the outgoing call
46 private /*lazy*/ MethodHandle exactInvoker;
47 private /*lazy*/ MethodHandle basicInvoker; // invokeBasic (unchecked exact)
48
49 // erased (partially untyped but with primitives) invoker for the outgoing call
50 // FIXME: get rid of
51 private /*lazy*/ MethodHandle erasedInvoker;
52 // FIXME: get rid of
53 /*lazy*/ MethodHandle erasedInvokerWithDrops; // for InvokeGeneric
54
55 // general invoker for the outgoing call
56 private /*lazy*/ MethodHandle generalInvoker;
57
58 // general invoker for the outgoing call, uses varargs
59 private /*lazy*/ MethodHandle varargsInvoker;
60
|
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang.invoke;
27
28 import java.util.Arrays;
29 import sun.invoke.empty.Empty;
30 import static java.lang.invoke.MethodHandleStatics.*;
31 import static java.lang.invoke.MethodHandleNatives.Constants.*;
32 import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
33 import static java.lang.invoke.LambdaForm.*;
34
35 /**
36 * Construction and caching of often-used invokers.
37 * @author jrose
38 */
39 class Invokers {
40 // exact type (sans leading target MH) for the outgoing call
41 private final MethodType targetType;
42
43 // FIXME: Get rid of the invokers that are not useful.
44
45 // exact invoker for the outgoing call
46 private /*lazy*/ MethodHandle exactInvoker;
47 private /*lazy*/ MethodHandle basicInvoker; // invokeBasic (unchecked exact)
48
49 // erased (partially untyped but with primitives) invoker for the outgoing call
50 // FIXME: get rid of
51 private /*lazy*/ MethodHandle erasedInvoker;
52 // FIXME: get rid of
53 /*lazy*/ MethodHandle erasedInvokerWithDrops; // for InvokeGeneric
54
55 // general invoker for the outgoing call
56 private /*lazy*/ MethodHandle generalInvoker;
57
58 // general invoker for the outgoing call, uses varargs
59 private /*lazy*/ MethodHandle varargsInvoker;
60
|