Package org.jruby.compiler

Examples of org.jruby.compiler.ArgumentsCallback


            throw new NotCompilableException("ERROR: backref with invalid type");
        }
    }

    public void callZSuper(CompilerCallback closure) {
        ArgumentsCallback argsCallback = new ArgumentsCallback() {
            public int getArity() {
                return -1;
            }

            public void call(BodyCompiler context) {
View Full Code Here


        Label done = new Label();

        // expression-based tests + bodies
        Label currentLabel = slowPath;
        for (int i = 0; i < conditionals.size(); i++) {
            ArgumentsCallback conditional = conditionals.get(i);
            CompilerCallback body = bodies.get(i);

            method.label(currentLabel);

            getInvocationCompiler().invokeEqq(conditional, getCaseValue);
View Full Code Here

        if (!RubyInstanceConfig.NOGUARDS_COMPILE_ENABLED) {
            method.go_to(after);
            method.label(slow);

            ArgumentsCallback newArgs = null;
            if (args != null) {
                newArgs = new ArgumentsCallback() {
                    public int getArity() {
                        return args.getArity();
                    }

                    public void call(BodyCompiler context) {
View Full Code Here

            throw new NotCompilableException("ERROR: backref with invalid type");
        }
    }

    public void callZSuper(CompilerCallback closure) {
        ArgumentsCallback argsCallback = new ArgumentsCallback() {
            public int getArity() {
                return -1;
            }

            public void call(BodyCompiler context) {
View Full Code Here

        Label done = new Label();

        // expression-based tests + bodies
        Label currentLabel = slowPath;
        for (int i = 0; i < conditionals.size(); i++) {
            ArgumentsCallback conditional = conditionals.get(i);
            CompilerCallback body = bodies.get(i);

            method.label(currentLabel);

            getInvocationCompiler().invokeEqq(conditional, getCaseValue);
View Full Code Here

    public void invokeAttrAssignMasgn(String name, CompilerCallback receiverCallback, final ArgumentsCallback argsCallback, boolean selfCall) {
        // value is already on stack, save it for later
        final int temp = methodCompiler.getVariableCompiler().grabTempLocal();
        methodCompiler.getVariableCompiler().setTempLocal(temp);
       
        ArgumentsCallback newArgumentsCallback = new ArgumentsCallback() {
            public int getArity() {
                return (argsCallback == null) ? 1 : argsCallback.getArity() + 1;
            }

            public void call(BodyCompiler context) {
View Full Code Here

    public void invokeEqq(ArgumentsCallback receivers, final CompilerCallback argument) {
        if (argument == null) {
            super.invokeEqq(receivers, argument);
        } else {
            if (receivers.getArity() == 1) {
                invokeDynamic("===", receivers, new ArgumentsCallback() {
                    public int getArity() {
                        return 1;
                    }

                    public void call(BodyCompiler context) {
View Full Code Here

            public void call(BodyCompiler context) {
                methodCompiler.method.aload(temp);
            }
        };

        ArgumentsCallback result = new ArgumentsCallback() {
            public void call(BodyCompiler context) {
                CompilerCallback value = new CompilerCallback() {
                    public void call(BodyCompiler context) {
                        invokeDynamic(attrName, receiver, null, CallType.FUNCTIONAL, null, false);
                    }
View Full Code Here

TOP

Related Classes of org.jruby.compiler.ArgumentsCallback

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.