Package org.jruby.internal.runtime.methods

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


    }

    private boolean compileRecursiveCall(String name, int generation, CallType callType, boolean iterator, DynamicMethod method, BodyCompiler context, ArgumentsCallback argsCallback, CompilerCallback closure, boolean expr) {
        if (currentBodyNode != null && context.isSimpleRoot()) {
            if (method instanceof InterpretedMethod) {
                InterpretedMethod target = (InterpretedMethod)method;
                if (target.getBodyNode() == currentBodyNode) {
                    context.getInvocationCompiler().invokeRecursive(name, generation, argsCallback, closure, callType, iterator);
                    if (!expr) context.consumeCurrentValue();
                    return true;
                }
            }
            if (method instanceof DefaultMethod) {
                DefaultMethod target = (DefaultMethod)method;
                if (target.getBodyNode() == currentBodyNode) {
                    context.getInvocationCompiler().invokeRecursive(name, generation, argsCallback, closure, callType, iterator);
                    if (!expr) context.consumeCurrentValue();
                    return true;
                }
            }

            if (method instanceof JittedMethod) {
                DefaultMethod target = (DefaultMethod)((JittedMethod)method).getRealMethod();
                if (target.getBodyNode() == currentBodyNode) {
                    context.getInvocationCompiler().invokeRecursive(name, generation, argsCallback, closure, callType, iterator);
                    if (!expr) context.consumeCurrentValue();
                    return true;
                }
            }
View Full Code Here


    }

    private boolean compileTrivialCall(String name, DynamicMethod method, int generation, BodyCompiler context, boolean expr) {
        Node simpleBody = null;
        if (method instanceof InterpretedMethod) {
            InterpretedMethod target = (InterpretedMethod)method;
            simpleBody = target.getBodyNode();
            while (simpleBody instanceof NewlineNode) simpleBody = ((NewlineNode)simpleBody).getNextNode();
        }

        if (method instanceof DefaultMethod) {
            DefaultMethod target = (DefaultMethod)method;
            simpleBody = target.getBodyNode();
            while (simpleBody instanceof NewlineNode) simpleBody = ((NewlineNode)simpleBody).getNextNode();
        }

        if (method instanceof JittedMethod) {
            DefaultMethod target = (DefaultMethod)((JittedMethod)method).getRealMethod();
            simpleBody = target.getBodyNode();
            while (simpleBody instanceof NewlineNode) simpleBody = ((NewlineNode)simpleBody).getNextNode();
        }

        if (simpleBody != null) {
            switch (simpleBody.getNodeType()) {
View Full Code Here

TOP

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

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.