Examples of dynamicInvoker()


Examples of java.lang.invoke.MutableCallSite.dynamicInvoker()

    public static CallSite genMH(SephObject marker) {
        MutableCallSite mcs = new MutableCallSite(methodType(SephObject.class, SephObject.class, SThread.class));
        MethodHandle _test = dropArguments(REF_EQ.bindTo(marker), 1, SThread.class);
        MethodHandle combiner = filterReturnValue(dropArguments(THREAD_TAIL_GETTER, 0, SephObject.class), exactInvoker(methodType(SephObject.class)));
        MethodHandle _then = foldArguments(dropArguments(mcs.dynamicInvoker(), 1, SephObject.class), combiner);
        MethodHandle _else = dropArguments(identity(SephObject.class), 1, SThread.class);
        MethodHandle pumper = guardWithTest(_test,
                                            _then,
                                            _else);
        mcs.setTarget(pumper);
View Full Code Here

Examples of java.lang.invoke.VolatileCallSite.dynamicInvoker()

            }
            System.out.println(i+":");
            try {
                VolatileCallSite vcs = new VolatileCallSite(mt3);
                System.out.println(vcs);
                MethodHandle mh = vcs.dynamicInvoker();
                vcs.setTarget(mh);
                // System.out.println(mh);
                mh.invoke(mt, mh);
            } catch (Throwable e) {
            }
View Full Code Here

Examples of org.dynalang.dynalink.MonomorphicCallSite.dynamicInvoker()

        DynamicLinker linker = new DynamicLinkerFactory().createLinker();
        MonomorphicCallSite callSite = new MonomorphicCallSite(CallSiteDescriptorFactory.create(
                MethodHandles.publicLookup(), "dyn:callMethod:format", MethodType.methodType(Object.class,
                        Object.class, Object.class, Object.class, Object.class)));
        linker.link(callSite);
        System.out.println(callSite.dynamicInvoker().invokeWithArguments(StaticClass.forClass(String.class),
                "%4.0f %4.0f", 12f, 1f));
    }

    public void testIntOrDouble() throws Throwable {
        final DynamicMethod dm = linker.getDynamicMethod("intOrDouble");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.