Package org.jruby.runtime

Examples of org.jruby.runtime.CallType


    @Override
    public Object interpret(ThreadContext context, DynamicScope dynamicScope, IRubyObject self, Object[] temp, Block block) {
        IRubyObject object = (IRubyObject) receiver.retrieve(context, self, dynamicScope, temp);
        IRubyObject[] values = prepareArguments(context, self, getCallArgs(), dynamicScope, temp);
       
        CallType callType = self == object ? CallType.FUNCTIONAL : CallType.NORMAL;
        RuntimeHelpers.invoke(context, object, getMethodAddr().getName(), values, callType, Block.NULL_BLOCK);
        return null;
    }
View Full Code Here


    @Override
    public Object call(ThreadContext context, IRubyObject self, IRubyObject receiver, DynamicScope currDynScope, Object[] temp) {
        IRubyObject[] values = prepareArguments(context, self, args, currDynScope, temp);
       
        if (callSite == null) {
            CallType callType = self == receiver ? CallType.FUNCTIONAL : CallType.NORMAL;
            RuntimeHelpers.invoke(context, receiver, name, values, callType, Block.NULL_BLOCK);
        } else {
            callSite.call(context, self, receiver, values);
        }
       
View Full Code Here

    }

    @JRubyMethod(rest = true, frame = true, visibility = PRIVATE, compat = RUBY1_8)
    public static IRubyObject method_missing(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
        Visibility lastVis = context.getLastVisibility();
        CallType lastCallType = context.getLastCallType();

        if (args.length == 0 || !(args[0] instanceof RubySymbol)) {
            throw context.runtime.newArgumentError("no id given");
        }
View Full Code Here

        ArgumentsCallback argsCallback = getArgsCallback(callNode.getArgsNode());
        CompilerCallback closureArg = getBlock(callNode.getIterNode());

        String name = callNode.getName();
        CallType callType = CallType.NORMAL;

        if (argsCallback != null && argsCallback.getArity() == 1) {
            Node argument = callNode.getArgsNode().childNodes().get(0);
            if (argument instanceof FixnumNode) {
                if (MethodIndex.hasFastFixnumOps(name)) {
View Full Code Here

    }

    @JRubyMethod(name = "method_missing", rest = true, module = true, visibility = PRIVATE, compat = RUBY1_9)
    public static IRubyObject method_missing19(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
        Visibility lastVis = context.getLastVisibility();
        CallType lastCallType = context.getLastCallType();

        if (args.length == 0 || !(args[0] instanceof RubySymbol)) {
            throw context.runtime.newArgumentError("no id given");
        }
View Full Code Here

    }

    @JRubyMethod(name = "method_missing", rest = true, module = true, visibility = PRIVATE)
    public static IRubyObject method_missing19(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
        Visibility lastVis = context.getLastVisibility();
        CallType lastCallType = context.getLastCallType();

        if (args.length == 0 || !(args[0] instanceof RubySymbol)) {
            throw context.runtime.newArgumentError("no id given");
        }
View Full Code Here

        return module;
    }

    public static IRubyObject method_missing(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
        Visibility lastVis = context.getLastVisibility();
        CallType lastCallType = context.getLastCallType();

        if (args.length == 0 || !(args[0] instanceof RubySymbol)) {
            throw context.runtime.newArgumentError("no id given");
        }
View Full Code Here

TOP

Related Classes of org.jruby.runtime.CallType

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.