Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ir.instructions.calladapter;
 
public abstract class CallAdapter {
    protected CallSite callSite = null;
    public CallAdapter(CallSite callSite) {
    }
    public abstract Object call(ThreadContext contextIRubyObject selfIRubyObject receiverDynamicScope currDynScopeObject[] temp);
    public CallSite getCallSite() {
        return null;
    }
    /*
    public static CallAdapter createFor(CallType callType, MethAddr methAddr, Operand args[], Operand closure) {
        CallSite callSite = getCallSiteFor(callType, methAddr);
        if (callType == CallType.UNKNOWN) return new AttrAssignCallAdapter(callSite, methAddr.getName(), args);
        if (containsSplat(args)) return new ManyArgBlockSplatCallAdapter(callSite, args, closure);
        switch(args.length) {
            case 0:
                if (closure != null) return new NoArgBlockOperandCallAdapter(callSite, args, closure);
                return new NoArgNoBlockOperandCallAdapter(callSite, args);
            case 1:
                if (isFixnum(args) && closure == null) {
                    return new OneArgNoBlockFixnumCallAdapter(callSite, args);
                }
                if (isConstant(args) && closure == null) return new OneArgNoBlockConstantCallAdapter(callSite, args);
                if (closure != null) return new OneArgBlockOperandCallAdapter(callSite, args, closure);
                return new OneArgNoBlockOperandCallAdapter(callSite, args);
            case 2:
                if (isConstant(args) && closure == null) return new TwoArgNoBlockConstantCallAdapter(callSite, args);
                if (closure != null) return new TwoArgBlockOperandCallAdapter(callSite, args, closure);
                return new TwoArgNoBlockOperandCallAdapter(callSite, args);
            case 3:
                if (isConstant(args) && closure == null) return new ThreeArgNoBlockConstantCallAdapter(callSite, args);
                if (closure != null) return new ThreeArgBlockOperandCallAdapter(callSite, args, closure);
                return new ThreeArgNoBlockOperandCallAdapter(callSite, args);
            case 4:
                if (isConstant(args) && closure == null) return new FourArgNoBlockConstantCallAdapter(callSite, args);
                if (closure == null) return new FourArgNoBlockOperandCallAdapter(callSite, args);
        }
        return new ManyArgBlockOperandCallAdapter(callSite, args, closure);
    }
*/
New to GrepCode? Check out our FAQ X