diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java
index 248c2488ea1f29e5e90dc5a72e1321201f78a65a..eaa5cfbb487b3a1e1c357e329afb3189b833253d 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java
@@ -23,8 +23,6 @@
 package com.oracle.truffle.r.engine;
 
 import java.io.File;
-import java.io.IOException;
-import java.io.Serializable;
 import java.util.Arrays;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -51,8 +49,6 @@ import com.oracle.truffle.api.profiles.ConditionProfile;
 import com.oracle.truffle.api.profiles.ValueProfile;
 import com.oracle.truffle.api.source.Source;
 import com.oracle.truffle.api.source.SourceSection;
-import com.oracle.truffle.api.vm.PolyglotEngine;
-import com.oracle.truffle.api.vm.PolyglotEngine.Value;
 import com.oracle.truffle.r.library.graphics.RGraphics;
 import com.oracle.truffle.r.nodes.RASTBuilder;
 import com.oracle.truffle.r.nodes.RASTUtils;
@@ -83,7 +79,6 @@ import com.oracle.truffle.r.runtime.RProfile;
 import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.RSource;
 import com.oracle.truffle.r.runtime.RStartParams.SA_TYPE;
-import com.oracle.truffle.r.runtime.RValue;
 import com.oracle.truffle.r.runtime.ReturnException;
 import com.oracle.truffle.r.runtime.RootWithBody;
 import com.oracle.truffle.r.runtime.SubstituteVirtualFrame;
@@ -328,51 +323,6 @@ final class REngine implements Engine, Engine.Timings {
         }
     }
 
-    public static final RValue executeR(final String program) throws IOException {
-        RContext.setDeepEmbedded();
-        final Value v = PolyglotEngine.newBuilder().config("application/x-r", "REngine", null).build().eval(Source.newBuilder(program).name("RBuilder").mimeType(RRuntime.R_APP_MIME).build());
-        final Object res = v.get();
-        if (res instanceof Serializable)
-            return new RValue((Serializable) res);
-        return new RValue(v.getSourceLocation().getCode());
-    }
-
-    public static final RValue executeApply(final RValue fun, final RValue args[]) throws IOException {
-        return executeR("f = " + fun.getValue() + "\nf(" + Arrays.stream(args).map(arg -> arg.getValue().toString()).collect(Collectors.joining(", ")) + ")");
-    }
-
-    public static final RValue translate(final Integer i) throws IOException {
-        return new RValue(i);
-    }
-
-    public static final RValue translate(final Double d) throws IOException {
-        return new RValue(d);
-    }
-
-    public static final RValue translate(final String s) throws IOException {
-        return new RValue(s);
-    }
-
-    public static final RValue translate(final Boolean b) throws IOException {
-        return new RValue(b);
-    }
-
-    public static final Integer translateBackToInteger(final RValue v) {
-        return (Integer) v.getValue();
-    }
-
-    public static final Double translateBackToDouble(final RValue v) {
-        return (Double) v.getValue();
-    }
-
-    public static final String translateBackToString(final RValue v) {
-        return (String) v.getValue();
-    }
-
-    public static final Boolean translateBackToBoolean(final RValue v) {
-        return (Boolean) v.getValue();
-    }
-
     private final class PolyglotEngineRootNode extends RootNode {
 
         private final List<RSyntaxNode> statements;
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java
index 7a858d921322dde03302073b288e8218cebf7a06..afafa3c17cd5139c53127e8a856a0e8c73237e39 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java
@@ -22,7 +22,11 @@
  */
 package com.oracle.truffle.r.engine;
 
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Arrays;
 import java.util.Locale;
+import java.util.stream.Collectors;
 
 import com.oracle.truffle.api.CallTarget;
 import com.oracle.truffle.api.CompilerAsserts;
@@ -37,7 +41,10 @@ import com.oracle.truffle.api.instrumentation.StandardTags;
 import com.oracle.truffle.api.metadata.ScopeProvider;
 import com.oracle.truffle.api.nodes.Node;
 import com.oracle.truffle.api.nodes.RootNode;
+import com.oracle.truffle.api.source.Source;
 import com.oracle.truffle.api.source.SourceSection;
+import com.oracle.truffle.api.vm.PolyglotEngine;
+import com.oracle.truffle.api.vm.PolyglotEngine.Value;
 import com.oracle.truffle.r.engine.interop.RForeignAccessFactoryImpl;
 import com.oracle.truffle.r.nodes.RASTBuilder;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinPackages;
@@ -49,6 +56,7 @@ import com.oracle.truffle.r.runtime.RAccuracyInfo;
 import com.oracle.truffle.r.runtime.RDeparse;
 import com.oracle.truffle.r.runtime.RError;
 import com.oracle.truffle.r.runtime.RRuntime;
+import com.oracle.truffle.r.runtime.RValue;
 import com.oracle.truffle.r.runtime.Utils;
 import com.oracle.truffle.r.runtime.context.Engine.IncompleteSourceException;
 import com.oracle.truffle.r.runtime.context.Engine.ParseException;
@@ -252,4 +260,48 @@ public final class TruffleRLanguage extends TruffleLanguage<RContext> implements
     public AbstractScope findScope(RContext langContext, Node node, Frame frame) {
         return RScope.createScope(node, frame);
     }
+
+    public static final RValue executeR(final String program) throws IOException {
+        final Value v = PolyglotEngine.newBuilder().config("application/x-r", "REngine", null).build().eval(Source.newBuilder(program).name("RBuilder").mimeType(RRuntime.R_APP_MIME).build());
+        final Object res = v.get();
+        if (res instanceof Serializable)
+            return new RValue((Serializable) res);
+        return new RValue(v.getSourceLocation().getCode());
+    }
+
+    public static final RValue executeApply(final RValue fun, final RValue args[]) throws IOException {
+        return executeR("f = " + fun.getValue() + ";f(" + Arrays.stream(args).map(arg -> arg.getValue().toString()).collect(Collectors.joining(", ")) + ")");
+    }
+
+    public static final RValue translate(final Integer i) throws IOException {
+        return new RValue(i);
+    }
+
+    public static final RValue translate(final Double d) throws IOException {
+        return new RValue(d);
+    }
+
+    public static final RValue translate(final String s) throws IOException {
+        return new RValue(s);
+    }
+
+    public static final RValue translate(final Boolean b) throws IOException {
+        return new RValue(b);
+    }
+
+    public static final Integer translateBackToInteger(final RValue v) {
+        return (Integer) v.getValue();
+    }
+
+    public static final Double translateBackToDouble(final RValue v) {
+        return (Double) v.getValue();
+    }
+
+    public static final String translateBackToString(final RValue v) {
+        return (String) v.getValue();
+    }
+
+    public static final Boolean translateBackToBoolean(final RValue v) {
+        return (Boolean) v.getValue();
+    }
 }