Package net.fortytwo.ripple.model

Examples of net.fortytwo.ripple.model.StackMapping.apply()


            } else {
                if (0 == f.arity()) {
                    Collector<RippleList> results = new Collector<RippleList>();
                    // Note: synchronous evaluation is required
                    // Note: stack context is trivial
                    f.apply(left.getRest(), results, mc);
                    for (RippleList s : results) {
                        RippleList i = s;
                        RippleList cur = right;
                        while (!cur.isNil()) {
                            i = i.push(cur.getFirst());
View Full Code Here


                //System.out.println("   f.arity() = " + f.arity());

                // Nullary functions don't need their argument stacks reduced.
                // They shouldn't even care if the stack is empty.
                if (f.arity() == 0) {
                    f.apply(rest, this, mc);
                }

                // Functions with positive arity do require the stack to be
                // reduced, to one level per argument.
                else {
View Full Code Here

                StackMapping f = first.getMapping();

                if (0 == f.arity()) {
                    try {
                        if (ops.isNil()) {
                            f.apply(stack.getRest(), outputSink, mc);
                        } else {
                            f.apply(stack.getRest(), new SpecialSink(ops, mc), mc);
                        }
                    } catch (Throwable t) {
                        // To keep things simple, just eat any errors.
View Full Code Here

                if (0 == f.arity()) {
                    try {
                        if (ops.isNil()) {
                            f.apply(stack.getRest(), outputSink, mc);
                        } else {
                            f.apply(stack.getRest(), new SpecialSink(ops, mc), mc);
                        }
                    } catch (Throwable t) {
                        // To keep things simple, just eat any errors.
                        logger.severe("error in expression reduction: " + t.getMessage());
                    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.