Package org.jruby.internal.runtime.methods

Examples of org.jruby.internal.runtime.methods.MethodNodes


        if (!(method instanceof MethodWithNodes)) {
            throw module.getRuntime().newRuntimeError("can only truffelize methods where JRuby can provide the nodes for us");
        }

        final MethodWithNodes methodWithNodes = (MethodWithNodes) method;
        final MethodNodes methodNodes = methodWithNodes.getMethodNodes();

        if (methodNodes == null || methodNodes.getArgsNode() == null || methodNodes.getBodyNode() == null) {
            throw module.getRuntime().newRuntimeError("can only truffelize methods where JRuby can provide the nodes for us");
        }

        final TruffleMethod truffleMethod = module.getRuntime().getTruffleBridge().truffelize(method, methodNodes.getArgsNode(), methodNodes.getBodyNode());

        module.addMethod(name, truffleMethod);
    }
View Full Code Here

TOP

Related Classes of org.jruby.internal.runtime.methods.MethodNodes

Copyright © 2018 www.massapicom. 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.