Examples of REnvironment


Examples of com.oracle.truffle.r.runtime.env.REnvironment

        }

        @Specialization
        protected REnvironment doAttach(@SuppressWarnings("unused") RNull what, int pos, String name) {
            controlVisibility();
            REnvironment env = new REnvironment.NewEnv(name);
            doAttachEnv(pos, env);
            return env;
        }
View Full Code Here

Examples of com.oracle.truffle.r.runtime.env.REnvironment

            controlVisibility();
            return doAttachEnv(what, (int) pos, name);
        }

        REnvironment doAttachEnv(REnvironment what, int pos, String name) {
            REnvironment env = new REnvironment.NewEnv(name);
            RStringVector names = what.ls(true, null);
            for (int i = 0; i < names.getLength(); i++) {
                String key = names.getDataAt(i);
                Object value = what.get(key);
                // TODO copy?
                env.safePut(key, value);
            }
            doAttachEnv(pos, env);
            return env;

        }
View Full Code Here

Examples of com.oracle.truffle.r.runtime.env.REnvironment

            controlVisibility();
            return doAttachList(what, (int) pos, name);
        }

        REnvironment doAttachList(RList what, int pos, String name) {
            REnvironment env = new REnvironment.NewEnv(name);
            RStringVector names = (RStringVector) what.getNames();
            for (int i = 0; i < names.getLength(); i++) {
                env.safePut(names.getDataAt(i), what.getDataAt(i));
            }
            doAttachEnv(pos, env);
            return env;
        }
View Full Code Here

Examples of com.oracle.truffle.r.runtime.env.REnvironment

        return new RNode[]{ConstantNode.create(RMissing.instance), ConstantNode.create(RMissing.instance), ConstantNode.create(RMissing.instance), ConstantNode.create(RMissing.instance)};
    }

    @Specialization
    protected Object doDelayedAssign(VirtualFrame frame, RAbstractStringVector nameVec, RPromise value, @SuppressWarnings("unused") RMissing evalEnv, @SuppressWarnings("unused") RMissing assignEnv) {
        REnvironment curEnv = curEnv(frame);
        return doDelayedAssign(nameVec, value, curEnv, curEnv);
    }
View Full Code Here

Examples of com.oracle.truffle.r.runtime.env.REnvironment

    @Specialization(guards = "doesInherit")
    @SuppressWarnings("unused")
    protected Object assignInherit(String x, Object value, REnvironment pos, RMissing envir, byte inherits, byte immediate) {
        controlVisibility();
        REnvironment env = pos;
        while (env != null) {
            if (env.get(x) != null) {
                break;
            }
            env = env.getParent();
        }
        try {
            if (env != null) {
                env.put(x, value);
            } else {
                REnvironment.globalEnv().put(x, value);
            }
        } catch (PutException ex) {
            throw RError.error(getEncapsulatingSourceSection(), ex);
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.