diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/EvalThread.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/EvalThread.java index 61cab9d33c37f0f8f92fcc4fbc46cd1d35a178f6..ac0107b5f77a5248213598d9cfc57ff95e4583b4 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/EvalThread.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/EvalThread.java @@ -36,7 +36,6 @@ import com.oracle.truffle.r.runtime.RError; import com.oracle.truffle.r.runtime.RInternalError; import com.oracle.truffle.r.runtime.RRuntime; import com.oracle.truffle.r.runtime.context.Engine.ParseException; -import com.oracle.truffle.r.runtime.context.RContext.ContextThread; import com.oracle.truffle.r.runtime.data.RDataFactory; import com.oracle.truffle.r.runtime.data.RList; import com.oracle.truffle.r.runtime.data.RNull; @@ -44,7 +43,7 @@ import com.oracle.truffle.r.runtime.data.RNull; /** * A thread for performing an evaluation (used by {@code .fastr} builtins). */ -public class EvalThread extends ContextThread { +public class EvalThread extends Thread { private final Source source; private final ContextInfo info; @@ -60,7 +59,6 @@ public class EvalThread extends ContextThread { public static final AtomicInteger threadCnt = new AtomicInteger(0); public EvalThread(ContextInfo info, Source source) { - super(null); this.info = info; this.source = source; threadCnt.incrementAndGet(); @@ -71,11 +69,6 @@ public class EvalThread extends ContextThread { @Override public void run() { PolyglotEngine vm = info.createVM(PolyglotEngine.newBuilder()); - try { - setContext(vm.eval(Engine.GET_CONTEXT).as(RContext.class)); - } catch (Throwable t) { - throw new RInternalError(t, "error while initializing eval thread"); - } init.release(); try { evalResult = run(vm, info, source); diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java index c48629276d6f4b73251dd293b0db9a60aa290c1a..d9f72a3fe20ca587b70955b045008845df1da253 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java @@ -24,7 +24,6 @@ package com.oracle.truffle.r.runtime.context; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -49,7 +48,6 @@ import java.util.concurrent.Executor; import java.util.function.Supplier; import com.oracle.truffle.api.Assumption; -import com.oracle.truffle.api.CallTarget; import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.RootCallTarget; @@ -221,21 +219,6 @@ public final class RContext implements RTruffleObject { } } - /** - * A thread that is explicitly associated with a context for efficient lookup. - */ - public abstract static class ContextThread extends Thread { - protected RContext context; - - public ContextThread(RContext context) { - this.context = context; - } - - public void setContext(RContext context) { - this.context = context; - } - } - private final RStartParams startParameters; private final RCmdOptions cmdOptions; private final String[] environment;